Simple Elixir web page - use Phoenix or not?

There was recently a whole topic around the bind thing.

The other thing about functional programming is thinking of code as expressions rather than statements.

If you look carefully at the unless example you’ll notice that the shell actually shows the evaluated value as nil. So while unless looks like a statement, it’s just a macro that either evaluates to the result of the supplied body or (implicitly) to nil, i.e. there always is an invisible alternative because an expression has to evaluate to something - even if that something happens to be nil.

3 Likes