I would highly recommend taking a walk through existing threads in the mailing list and forums. This and other similar pipe additions have been requested before. I'm glad you're interested in improving the language, but the proposal itself doesn't reflect a familiarity with existing answers to this very question.
On Friday, March 9, 2018 at 2:45:24 PM UTC-5, Boyd Multerer wrote: > > A pattern I find myself in all the time is when I am writing a piped > series of function calls, when I need to pass the result into some > parameter other than the first one. > > Something like this. > > Map.get( p_map, puid ) > |> Group.insert_at( index, uid ) > |> ( &Map.put(p_map, puid, &1) ).() > |> ( &put_primitive_map(graph, &1) ).() > |> something_else() > > The trick to pipe into a anonymous function works, but is ugly and least > to poor readability. > > I would really like a pipe_right macro, which would work something like > this. > > Map.get( p_map, puid ) > |> Group.insert_at( index, uid ) > |>> Map.put(p_map, puid, &1) > |>> put_primitive_map(graph, &1) > |> something_else() > > Note that it should be interchangeable with the standard pipe without > breaking the piping flow. > > I keep running into this and reached the point where I really want this > macro in the Kernel module. > > -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/2bc5ebe8-eeba-4834-a155-e342578e8330%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.