[erlang-questions] Pipe Operator in Erlang?
Gianfranco Alongi
gianfranco.alongi@REDACTED
Thu Jul 9 19:00:43 CEST 2015
Unless the language actually supports partial application, it feels odd to
add this.
BR
G
On Thu, Jul 9, 2015 at 6:24 PM, Pierre Fenoll <pierrefenoll@REDACTED>
wrote:
> I hope it will, but in addition to "curried" funs:
>
> fun f(2)/1 == fun(Y) -> f(2, Y) end.
>
> Thus:
>
> 3 |> fun f(2)/1 == -1
>
>
>
>
>
> Cheers,
> --
> Pierre Fenoll
>
>
> On 9 July 2015 at 08:38, Tristan Sloughter <t@REDACTED> wrote:
>
>> Yea yea, Fred pointed out a typo:
>>
>> f(X) ->
>> fun(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: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
>>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150709/259fbb76/attachment.htm>
More information about the erlang-questions
mailing list