const val = condition ? truthy_handler : falsy_handler
In elixir it is handled differently, the most common and frequently used way being:
if(condition, do: truthy_handler, else: falsy_handler)
If you like conditions, you might also enjoy the post Get the index position from element in a matched condition.