10 Killer Elixir Tips #1
Blackode
954

Another trick for ternary, if there is not one, is to use a map. Something like ternary = %{false: “no”, true: “yes”} This can then be used like ternary[1 == 0] to get the proper response back.

Show your support

Clapping shows how much you appreciated Vic’s story.