Using Elixir pipe example

To demonstrate how pipe operator is used in Elixir, we try out with the following codes.

defmodule Test do
   def exact(a) do
   def toInt(a) do


This basically takes 200, pass it to Test.exact (which returns anything that it get) and pass it on to Test.toInt which convert it into an integer. 

"200" |> Test.exact |> Test.toInt


Popular posts from this blog

ionic2 cordova build android - Unable resolve gradle 2.2.3

A quick tutorial for OWASP ZAP tool for beginners