Open japaric opened 9 years ago
Sugar for:
for e in m.iter_mut() { f(e) }
Probably via a Map trait:
Map
trait Map<T> { fn map(&mut self, f: |&mut T|); }
Although it'd be nice to just write m.map(Float::sin) or even better just m.sin() (like Python universal functions).
m.map(Float::sin)
m.sin()
This can be thread parallelized in the future.
Sugar for:
Probably via a
Map
trait:Although it'd be nice to just write
m.map(Float::sin)
or even better justm.sin()
(like Python universal functions).This can be thread parallelized in the future.