Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- impl of iter::base_iter<uint> for uint
- {
- fn each(blk: fn(&&uint) -> bool)
- {
- let mut i = 0u;
- while i < self
- {
- if (!blk(i))
- {
- ret;
- }
- i += 1u;
- }
- }
- fn size_hint() -> option<uint>
- {
- option::some(self)
- }
- }
- let names = iter::map_to_vec(N) {|i: uint| #fmt["a%?", i]};
Add Comment
Please, Sign In to add comment