FastClosures.jl
FastClosures.jl copied to clipboard
@closure with unnamed anonymous function declared with "function" keyword?
Is there a reason why this is disallowed?
@closure function (x,y,z)
x+a
end
It stems from this assert here: https://github.com/c42f/FastClosures.jl/blob/f9314209eacf90fc49ca4a1e320f71ae12c8f73b/src/FastClosures.jl#L40
Happy to contribute a PR to handle this case, but just wanted to check if there's a reason for that assert. Seems related to #1.
Happy to contribute a PR to handle this case
Please do! The reason this exists is because FastClosures doesn't understand the full set of anonymous function syntaxes: we need to reproduce parts of lowering within the macro to get access to allow each the possible syntactic forms.
The solution is to add code which recognizes more of the forms.