3 ms·
On the one hand, I tend to agree and I dislike making JS syntax even more complex than it already is. On the other hand, it works well in F# (and the ML that t
by WastingMyTime89 4y ago
On the one hand, I tend to agree and I dislike making JS syntax even more complex than it already is.
On the other hand, it works well in F# (and the ML that then borrowed it from F#) because it’s just a standard infix operator there and everything is already curried which is definitely not the case with JS. It means you will nearly always have to use a lambda when piping in JS which is honestly a bit tedious.
- substation13 4y agoYou do for member access, e.g. let firstName = person |> fun x -> x.FirstName |> trim Some languages allow: let firstName = person |> .FirstName |> trim But you're right, expression-orientation and currying make this much more natural.