Re:Try Gleam
by kaoD on Monday November 09, 2026 @08:04AM
(#50425036)
[delayed]
[ Parent
| on HN ]
Yes Gleam allows you to do
f(arg, _)
See the relevant docs: https://tour.gleam.run/everything/#functions-function-captur...
But that's a single argument right?
Seems more limiting than the closure way. Scala allows multiple _ but in turn that doesn't allow changing ordering.
TBH, I feel this stuff is not really worth it,
I think the single hole version is a good compromise compared to actual currying or multiple holes, since it's strictly better than something like first or last argument threading (e.g. ->, ->> in Clojure), easier to reason about than currying, and in my experience most of the time you'll only be dealing with one argument to pass piping anyway. Anonymous functions are fine for the cases you need more flexibility.
Re:Try Gleam
by senderista on Monday November 09, 2026 @01:55PM
(#50429889)
Are there any physicists out there who are reminded of abstract index notation for tensors?