@value
struct Foo:
fn func(self) -> Int:
return 42
# None of these declarations work:
fn high_order_func(f: fn (Foo) -> Int) -> Int:
# fn high_order_func(f: fn () -> Int) -> Int:
return f()
fn main() -> Int:
foo = Foo()
print(high_order_func(foo.func))