Uses MacroTools' @capture in the @spawn parser to parse calls, and in the process adds support for do-block syntax and direct calls to anonymous functions:
# Do-block syntax
Dagger.@spawn sum(A) do a
return a+1
end
# Direct call to anonymous function
Dagger.@spawn A->sum(A; dims=1)+2
This should make it easier for users to apply Dagger.@spawn to arbitrary calls. Note that I am not tackling #514, as that is significantly more difficult to do (it requires finding and transforming all values which might be a DTask).
Uses MacroTools'
@capture
in the@spawn
parser to parse calls, and in the process adds support for do-block syntax and direct calls to anonymous functions:This should make it easier for users to apply
Dagger.@spawn
to arbitrary calls. Note that I am not tackling #514, as that is significantly more difficult to do (it requires finding and transforming all values which might be aDTask
).Fixes #480 Fixes #479 Fixes #421