|
|
|
|
|
by privethedge
2425 days ago
|
|
> a.map(g).map(f) ≣ a.map(x => f(g(x))) > But the one on the left will be slower and use a lot more memory. Is it really true?
I mean, GC will clean the intermediate array, won't it?
And the speed won't be significantly slower.
It's still linear complexity anyway. |
|