4 ms·
There are a couple of options to simplify and emulate a ternary operator: if x, do: y, else: z Or, though it's not very idiomatic Elixir, this also works: x
by jonnycat 3y ago
There are a couple of options to simplify and emulate a ternary operator:
if x, do: y, else: z
Or, though it's not very idiomatic Elixir, this also works:
x && y || z
- te_chris 3y agoThe binary matching is relatively idiomatic in liveview - check the CoreComponents files.