Resumable and copyable functions in Julia, with optional function-specific globals. See the docs for example usage.
Used in the Turing probabilistic programming language to implement various particle-based inference methods, for example those in AdvancedPS.jl.