We often write code like this:
Such code can be written in Elixir as:
Code:
IO.puts(tabularize(to_map(Store.get_host(host))))
'--- or ---
list_data = Store.get_host(host)
map = to_map(list)
formatted_output = tabularize(map)
IO.puts(formatted_output)
Code:
host
|> Store.get_host
|> to_map
|> tabularize
|> IO.puts