Y
Hacker News
new
|
ask
|
show
|
jobs
by
himom
2918 days ago
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)
1 comments
steveklabnik
2918 days 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.
link
jeffmcmahan
2918 days ago
Same in JS
link