3 ms·
Why not use `fold` to implement `find_min`?
by throwaway928 12y ago
Why not use `fold` to implement `find_min`?
- Gankro 12y agoWell I mean if you want to cheat with iterator adaptors you can just use min_by: http://doc.rust-lang.org/std/iter/trait.IteratorExt.html#tymethod.min_by http://doc.rust-lang.org/std/iter/trait.IteratorExt.html#tym... :P (shhh I was tired and trying to come up with a simple but moderate complexity example)