[erlang-questions] Pipe Operator in Erlang?

Éric Pailleau eric.pailleau@REDACTED
Fri Jul 10 07:40:45 CEST 2015


Le 9 juil. 2015 17:38, Tristan Sloughter <t@REDACTED> a écrit :
>
> Yea yea, Fred pointed out a typo: 
>
> f(X) -> 
>     fun(Y) -> X + Y end. 
>
> f(X, Y) -> 
>     X - Y. 
>
> 3 |> f(2). 
Following Fred remark,  [ 3 |> f(3)]  would be difficult for a parser to understand between the new operator and a (faulty in such case) improper list. As far pipe is already used in list comprehension, this character shouldn't be used for another purpose. 


>
> 5 or 1? 
>
> -- 
>   Tristan Sloughter 
>   t@REDACTED 
>
> On Thu, Jul 9, 2015, at 10:35 AM, Tristan Sloughter wrote: 
> > I hope not. Take this code for example 
> > 
> > f(X) -> 
> >     g(Y) -> X + Y end. 
> > 
> > f(X, Y) -> 
> >     X - Y. 
> > 
> > 3 |> f(2). 
> > 
> > 5 or 1? 
> > 
> > -- 
> >   Tristan Sloughter 
> >   t@REDACTED 
> > 
> > On Thu, Jul 9, 2015, at 10:24 AM, Volkert wrote: 
> > > Dear all, 
> > > 
> > > I really love the Pipe Operator |> in Elixir and F#. 
> > > 
> > > Are there any plans to have this in Erlang? 
> > > 
> > > Volkert 
> > > 
> > > 
> > > 
> > > _______________________________________________ 
> > > erlang-questions mailing list 
> > > erlang-questions@REDACTED 
> > > http://erlang.org/mailman/listinfo/erlang-questions 
> > _______________________________________________ 
> > erlang-questions mailing list 
> > erlang-questions@REDACTED 
> > http://erlang.org/mailman/listinfo/erlang-questions 
> _______________________________________________ 
> erlang-questions mailing list 
> erlang-questions@REDACTED 
> http://erlang.org/mailman/listinfo/erlang-questions 


More information about the erlang-questions mailing list