3 ms·
In Haskell, functions often take their arguments in the order that makes the most sense to partially apply. In this case, that would probably be clamp(min, max,
by nemetroid 6y ago
In Haskell, functions often take their arguments in the order that makes the most sense to partially apply. In this case, that would probably be clamp(min, max, val): supplying the first two arguments results in a reusable clamping function.
- ric2b 6y agoIt would be nice if partial application worked with keyword arguments. Actually it would be great if Haskell natively supported keyword arguments.