Created
October 2, 2014 10:35
-
-
Save alco/b34eecc74c273b8a3c74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule M do | |
def test do | |
cond do | |
length([1,2,3]) == 0 -> false | |
true | |
"oops, I forgot the arrow" | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
λ elixirc condi.exs | |
condi.exs:4: warning: this check/guard will always yield the same result | |
λ iex | |
Erlang/OTP 17 [erts-6.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace] | |
Interactive Elixir (0.15.1) - press Ctrl+C to exit (type h() ENTER for help) | |
iex(1)> M.test | |
** (CondClauseError) no cond clause evaluated to a true value | |
M.test/0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment