On Friday, August 9, 2019 at 10:55:32 PM UTC-6, Rich Morin wrote: > > Clojure has explicit syntax which handles the use case where one > doesn't want to pipe into the first argument of a function. It > only handles the first and last argument cases, but it could be > generalized pretty easily, as follows: > > "foo" > |> String.upcase() > |2> Regex.scan(~r/foo/) >
I still think something like: ``` "foo" |> String.upcase() |> Regex.scan(~r/foo/, _) ``` Would be best, and would also replace the use of pipe_to (although still useful to have at times perhaps?), is backwards compatible, and is explicit because of the 'hole' there from the `_`. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/25584a40-aad0-46e4-a96f-664444af3744%40googlegroups.com.
