Feb 24, 2017 · 1 min read
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.
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.