3 ms·
Another great concept is that function application and array indexing has the same syntax. a.map(f) is basically† just: f[a] and: a.map(x => m[
by geocar 8y ago
Another great concept is that function application and array indexing has the same syntax.
a.map(f)
is basically† just:
f[a]
and:
a.map(x => m[x])
is still just:
m[a]
†: Rank notwithstanding. If that bothers you that f might take an atom, pretend I said f@/:a and m@/:a instead.