Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
himom
· 8y ago · 0 comments
Swift closure syntax, at least in <= 2.0, made for awkward API calls, since it wasn’t clear whether inline or after closures were used.
In Ruby,
a.map(&:succ)
Comments
[–]
steveklabnik
8y ago
If you have a named function, rust lets you do
a.map(succ)
as well, since functions can be used where closures can, as long as the types work.
[–]
jeffmcmahan
8y ago
Same in JS