>
> The `Function` module was introduced not long ago as there was no good 
> place to host the functions that are currently in there. Having a function 
> with this particular behavior into the `Function` module seems weird to me. 
> Was having `Pipe` module considered at any point? Examples: `Pipe.to` or 
> `Pipe.into`:

 
           "foo"
|> String.upcase()
|> Pipe.to(&Regex.scan(~r/foo/, &1)

One issue I have with having such function in the `Function` module is that 
it will be inconsistent with most of the code - the functions in `Enum` 
take the enumerable as the first argument, same goes for `Map`, `List`, 
`String`, `Tuple` and so on.

There is no `Pipe` struct or type and when working with pipes you already 
know that a value (first argument) is piped into a function (second 
argument), so having such parameters ordering in the `Pipe` module is 
logical






-- 
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/bb948992-0d8b-4f04-9c9f-dc7d2da043b3%40googlegroups.com.

Reply via email to