Hacker News new | ask | show | jobs
by tome 1866 days 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`.)

1 comments

Thank 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.