條件語句
請注意,do...end
語法是常規關鍵字列表的語法糖,因此你實際上可以這樣做:
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"