FastClosures.jl icon indicating copy to clipboard operation
FastClosures.jl copied to clipboard

Faster closure variable capture

Results 4 FastClosures.jl issues
Sort by recently updated
recently updated
newest added

The last example seems to work now without `@closure` ```julia julia> versioninfo() Julia Version 1.7.3 Commit 742b9abb4d (2022-05-06 12:58 UTC) Platform Info: OS: Linux (x86_64-pc-linux-gnu) CPU: 11th Gen Intel(R) Core(TM)...

```julia using FastClosures outer = [[1]] @closure map(outer) do inner map(inner) do x x + 1 end end ``` ``` UndefVarError: x not defined ``` The reason is, that `@closure`...

bug

Is there a reason why this is disallowed? ```julia @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...

The semantics of variable capture in `@closure` were originally intended to be the same as julia, but I got this wrong because at the time I didn't understand the intended...