Skip to content

Instantly share code, notes, and snippets.

spider-mario

Block or report user

Report or block spider-mario

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@spider-mario
spider-mario / for_bool.rs
Created Jun 3, 2013
error: expected `for` closure to return `bool`, but found `bool`
View for_bool.rs
fn limited_while(nmax: uint, condition: &fn() -> bool, body: &fn() -> bool) {
for nmax.times {
if (!(condition() && body())) {
break
}
}
}
macro_rules! limited_while(
($condition: expr, nmax: $nmax: expr) => (
You can’t perform that action at this time.