We have passed_func which is a function that returns a function, and apply_func which is takes function as an argument. Inside apply_func we apply passed_func twice.
Like Ruby, inside Elixir Enum module has a function called map which has the same purpose, different with Ruby, in Elixir the map function takes two arguments, first is a collection and second is a function.
The & Shortcut
Again like a Ruby, Elixir has & operator to write short function. The body of the function surrounded by ( and ), and the the placeholders &1, &2, and so on correspond to the first, second, and subsequent parameters of the function.
This shortcut function can be applied in map function: