Elixir LanguageConditionals


Remarks

Note that the do...end syntax is syntactic sugar for regular keyword lists, so you can actually do this:

unless false, do: IO.puts("Condition is false")
# Outputs "Condition is false"

# With an `else`:
if false, do: IO.puts("Condition is true"), else: IO.puts("Condition is false")
# Outputs "Condition is false"