Pipe operator and functions (not function calls)

I feel you already have the solution there… If you find the .() too ugly just use a normal function wrapping your functionality. I think there is no better way, and the reason for not making the pipe is related to a discussion over lisp1 vs lisp2 function calls. Elixir just settles on one.

For instance, if you could have a variable contain an anonymous function in Elixir with zero arguments, it would be very difficult for Elixir to know when that function should be called or be used as a value, as the parenthesis may be omitted.

2 Likes