3 ms·
You're correct about the $1 syntax representing parameters, but the parameter indices start at 0: sort(arr) { $0 > $1 }
by nextstep 12y ago
You're correct about the $1 syntax representing parameters, but the parameter indices start at 0:
sort(arr) { $0 > $1 }