Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 16005

Interesting code

$
0
0
We often write code like this:
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)

Such code can be written in Elixir as:
Code:

host
|> Store.get_host
|> to_map
|> tabularize
|> IO.puts


Viewing all articles
Browse latest Browse all 16005

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>