提交 6ac86e92 编写于 作者: T Tim Chevalier

Make uint::iterate pure

上级 3cb147a7
......@@ -71,7 +71,7 @@
* `true` If execution proceeded correctly, `false` if it was interrupted,
* that is if `it` returned `false` at any point.
*/
fn iterate(lo: uint, hi: uint, it: fn(uint) -> bool) -> bool {
pure fn iterate(lo: uint, hi: uint, it: fn(uint) -> bool) -> bool {
let mut i = lo;
while i < hi {
if (!it(i)) { ret false; }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册