Re:Elixir v1.1.0 Released
by totallymike on Friday September 25, 2015 @11:26PM
(#10281980)
It's a macro. It takes the result of the prior operation and inserts it as the first parameter of the next operation.
More or less it rewrites
String.downcase("FOO\0BAR") |> String.split("\0")
to String.split(String.downcase("FOO\0BAR"), "\0")
"moo".Replace('m', 'z').ToUpper();
Or, fully qualified with "every method in its own namespaced module";
"moo".(string.Replace('m', 'z')).(string.ToUpper());
I'm not sure if elixir is doing anything fancy here that I'm not seeing, though. I still haven't had a chance to try it out.