Hacker News new | ask | show | jobs
by Johnny_Brahms 3197 days ago
It surprises me to no end that programming languages that promote a functional style with higher order functions do not support partial application as a part of the standard library. It covers 95% of the uses of curried procedures and gives you compiler warnings if you pass too few or too many arguments.

In scheme we have the cut macro that all self-respecting implementations provide which guarantees you zero runtime overhead.

2 comments

Here's an interesting post about the challenges of currying syntax in new languages:

https://github.com/apple/swift-evolution/blob/master/proposa...

Why is dedicated standard library support needed, when you can recover it from tuples, single-argument functions and Hom-tensor adjunctions[0]?

[0] https://en.wikipedia.org/wiki/Tensor-hom_adjunction