4 ms·
Why not use the haskell bind operator? They're similar, right?
by sbussard 7y ago
Why not use the haskell bind operator? They're similar, right?
- mrkeen 7y agocloser to compose (.) than bind. f . g = \x -> f (g x) f |> g = \x -> g (f x)
- ajuhasz 7y agoI think `|>` would actually be `&` in Haskell, it takes a value and a function. `(&) :: a -> (a -> b) -> b` https://hackage.haskell.org/package/base-4.12.0.0/docs/Data-Function.html#v:-38- https://hackage.haskell.org/package/base-4.12.0.0/docs/Data-...
- lgas 7y agoIt's flip ($)
- hopia 7y agoimport Data.Function (&)
- hopia 7y agoHaskell already has the function application operator, It's simply & in Haskell.
- adgasf 7y agoPeople seem to find |> easier to learn.
- oneshot-a4yukdk 7y agoThere is a proposal[0] but I'm afraid it's pretty much dead now. [0] https://github.com/tc39/proposal-bind-operator/ https://github.com/tc39/proposal-bind-operator/