Greetings,
A resumable function (singleton type of function , subtype of Function) , when put as a struct field variable, causes the error “struct expression not at top level” while a normal function does not. Could anyone explain? thanks
using ResumableFunctions
struct foo
f::Function
end
function test()
@resumable function f(i::Int)
if i==1
@yield 1
else
@yield 2
end
end
odepro=foo(f)
end