diff options
| author | bors <bors@rust-lang.org> | 2013-06-26 09:47:16 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-06-26 09:47:16 -0700 |
| commit | 3433851a37f04621e0c091ec2180aeddbdd5ada5 (patch) | |
| tree | 521ab48bddd3bc26043cfcaa23db5b85cf8ab8c5 /src/rt/rust_kernel.cpp | |
| parent | 4e5b4807a5b620627cf6e782524fbe6fc1463c2d (diff) | |
| parent | 6291702cf334f4b1fe41662bc3b0d996ca7ced19 (diff) | |
| download | rust-3433851a37f04621e0c091ec2180aeddbdd5ada5.tar.gz rust-3433851a37f04621e0c091ec2180aeddbdd5ada5.zip | |
auto merge of #7345 : blake2-ppc/rust/iterator-flat-map, r=thestinger
flat_map_ produces an iterator that maps each element to an iterator, and yields the elements of the produced iterators. This is the monadic bind :: M a -> (a -> M b) -> M b for iterators. Named just like the vec method, but with a trailing underline until the method resolution bug is resolved. We discussed the name chain_map, but I decided to go with flat_map_ for consistency with vec. Since it.map(f).flatten() would be the same as it.flat_map(f), we could choose to just implement a flatten method instead. Either way the possibilities are the same but flat_map is more convenient.
Diffstat (limited to 'src/rt/rust_kernel.cpp')
0 files changed, 0 insertions, 0 deletions
