3 ms·
`($x)` could equivalently have been written `\f -> f x`, which would have been a bit clearer. In general in Haskell if you have an infix operator `OP` then `(O
by tome 5y ago
`($x)` could equivalently have been written `\f -> f x`, which would have been a bit clearer.
In general in Haskell if you have an infix operator `OP` then `(OP x)` means the same thing as `\y -> y OP x`. (Additionally in this case you need to know that `$` is defined by `f $ x = f x`.)
- linkdd 5y agoThank you for your clarification. And I just re-read my example in JS and I've made a TERRIBLE mistake ^^ `.every()` would be `foldl1 (&&)`, I would need `.some()` instead to have the correct behavior.