elixir if statement
iex> if true do
...> "This works!"
...> end
"This works!"
iex> unless true do
...> "This will never be seen"
...> end
nil
iex> if nil do
...> "This won't be seen"
...> else
...> "This will"
...> end
"This will"
elixir if statement
iex> if true do
...> "This works!"
...> end
"This works!"
iex> unless true do
...> "This will never be seen"
...> end
nil
iex> if nil do
...> "This won't be seen"
...> else
...> "This will"
...> end
"This will"
elixir function arity
inspect :erlang.fun_info(fn -> :ok end)[:arity]
inspect :erlang.fun_info(fn a,b-> a+b end)[:arity]
inspect fn a,b-> a+b end |> is_function
inspect fn a,b-> a+b end |> is_function(1)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us