Re:F# Pipeline Operator in JavaScript with Babel
by sbussard on Tuesday February 04, 2020 @12:08PM
(#22238050)
Why not use the haskell bind operator? They're similar, right?
[ Parent
| on HN ]
Re:F# Pipeline Operator in JavaScript with Babel
by adgasf on Tuesday February 04, 2020 @12:29PM
(#22238323)
People seem to find |> easier to learn.
Re:F# Pipeline Operator in JavaScript with Babel
by oneshot-a4yukdk on Tuesday February 04, 2020 @04:34PM
(#22241231)
There is a proposal[0] but I'm afraid it's pretty much dead now.
Re:F# Pipeline Operator in JavaScript with Babel
by mrkeen on Tuesday February 04, 2020 @12:17PM
(#22238171)
closer to compose (.) than bind.
f . g = \x -> f (g x)
f |> g = \x -> g (f x)
Re:F# Pipeline Operator in JavaScript with Babel
by ajuhasz on Tuesday February 04, 2020 @03:12PM
(#22240386)
I 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-...
Re:F# Pipeline Operator in JavaScript with Babel
by hopia on Tuesday February 04, 2020 @05:46PM
(#22241923)
Haskell already has the function application operator, It's simply & in Haskell.