News for hackers. Stuff that matters.
Re:Kotlin 1.4 by agumonkey on Tuesday August 18, 2020 @01:56PM (#24201887)
I never saw that idiom in any ml classes.. I'm honestly surprised
Re:Kotlin 1.4 by pjmlp on Wednesday August 19, 2020 @05:40AM (#24208688)
It is a common idiom for dealing with deterministic resource management, and takes advantage that in ML all functions are single parameter actually.

So you can partially specialize, and then the lambda gets the already allocated/opened resource, thus acting as region/arena resource allocator.

And you can combine it with currying to apply the concept to multiple kind of parameters.