14 lines
513 B
Elixir
14 lines
513 B
Elixir
defmodule Bob do
|
|
def hey(input) do
|
|
cond do
|
|
String.last(input) == "?" -> "Sure."
|
|
String.length(String.trim(input)) == 0 -> "Fine. Be that way!"
|
|
String.upcase(input) == input -> if(String.downcase(input) == input) do
|
|
"Whatever."
|
|
else
|
|
"Whoa, chill out!"
|
|
end
|
|
true -> "Whatever."
|
|
end
|
|
end
|
|
end
|