I believe this is the wrong way to think about it. We’re certainly transforming a socket, but what we’re returning is a different value altogether that contains the socket but also additional information that is used for branching. If we really wanted to make it about piping a socket all the way through, that additional info would need to be part of the socket, ie, have a socket.reply key or something like that. But of course I don’t think it really belongs there, so we need to return a wrapper value. If Elixir had built-in monads then we could do something closer to what you’re talking about where we shove the wrapped monadic value all the way through from the get-go, but introducing a pipeable function is just masking what is going on and not actually solving what you’re talking about. All it does is give us a visual pipeline.
2 Likes


















