2012-02-13 07:47:36 -06:00
|
|
|
// Issue #1818
|
|
|
|
|
2012-03-09 18:11:56 -06:00
|
|
|
fn lp<T>(s: str, f: fn(str) -> T) -> T {
|
2012-02-13 07:47:36 -06:00
|
|
|
while false {
|
|
|
|
let r = f(s);
|
|
|
|
ret r;
|
|
|
|
}
|
|
|
|
fail;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn apply<T>(s: str, f: fn(str) -> T) -> T {
|
|
|
|
fn g<T>(s: str, f: fn(str) -> T) -> T {f(s)}
|
2012-06-30 18:19:07 -05:00
|
|
|
g(s, |v| { let r = f(v); r })
|
2012-02-13 07:47:36 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|