[erlang-questions] Pipe Operator in Erlang?

Dmitry Belyaev <>
Fri Jul 10 12:07:30 CEST 2015


That is already done in erlando:

https://github.com/rabbitmq/erlando
-- 
Best wishes,
Dmitry Belyaev

On 10 July 2015 6:48:57 PM AEST, Jesper Louis Andersen <> wrote:
>On Thu, Jul 9, 2015 at 5:24 PM, Volkert
><>
>wrote:
>
>> Are there any plans to have this in Erlang?
>
>
>As already noted, the operator |> is hard to add to the language
>because it
>doesn't work that well.
>
>I'd much rather see a succinct notion for a monadic val/bind where I
>can
>set a monad
>
>M = #monad { val = Val, bind = Bind },
>with M do
>    X <- foo(),
>    Y <- bar(X),
>    return(Y)
>end
>
>and run inside the monad[0]. Since the language is dynamically typed,
>you
>would have to supply the monad you are building over, but you would be
>able
>to do a lot of the things people request with the |> operator, as it is
>a
>special case.
>
>[0] I've given this very little syntactical thought at the moment, but
>hopefully you get the idea.
>
>
>-- 
>J.
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>erlang-questions mailing list
>
>http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150710/9cde8d05/attachment.html>


More information about the erlang-questions mailing list