HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by agumonkey | Hacker News Reader
Parent
Full thread
agumonkey
·
Any example ? or an idiom name I can google ?
View on HN
swsieber
·
Groovy also does it. I have no idea what the name is though:
https://mrhaki.blogspot.com/2009/11/groovy-goodness-passing-...
matsemann
·
Not sure about the exact name. But kotlin also has "function with receiver" that together with this makes it very easy to write almost a custom domain language on top of kotlin.
matsemann
·
Can't edit, but here's an explanation
https://kotlinlang.org/docs/reference/type-safe-builders.htm...
jayrhynas
·
Swift calls it trailing closure syntax
agumonkey
·
Ok so it's an explicit parameter, the function is just ~curried so you can just write it nicely.
Reply on news.ycombinator.com