This reverts commit e305ab38518352d934c081687a6cdccd5af4dfb6. Oops again. Reverting a mistaken revert.
12 lines
154 B
Rust
12 lines
154 B
Rust
fn even(&&e: int) -> bool {
|
|
e % 2 == 0
|
|
}
|
|
|
|
fn log_if<T>(c: fn(T)->bool, e: T) {
|
|
if c(e) { log e; }
|
|
}
|
|
|
|
fn main() {
|
|
(bind log_if(even, _))(2);
|
|
}
|