Expand description
Closures and their application (lean_apply_*, ported from apply.cpp).
m_fun of a closure is a Rust unsafe fn(Obj, ...) -> Obj with m_arity parameters cast to
*const (). For an arity above LEAN_CLOSURE_MAX_ARGS it is an
unsafe fn(*mut Obj) -> Obj receiving the arguments as an array, as in the C backend.
Constants§
- LEAN_
CLOSURE_ MAX_ ARGS - Largest arity whose function takes its arguments as separate parameters.
Functions§
- lean_
alloc_ ⚠closure - lean_
apply_ ⚠1 - Applies the closure
fto the arguments; all of them are consumed. - lean_
apply_ ⚠2 - Applies the closure
fto the arguments; all of them are consumed. - lean_
apply_ ⚠3 - Applies the closure
fto the arguments; all of them are consumed. - lean_
apply_ ⚠4 - Applies the closure
fto the arguments; all of them are consumed. - lean_
apply_ ⚠5 - Applies the closure
fto the arguments; all of them are consumed. - lean_
apply_ ⚠6 - Applies the closure
fto the arguments; all of them are consumed. - lean_
apply_ ⚠7 - Applies the closure
fto the arguments; all of them are consumed. - lean_
apply_ ⚠8 - Applies the closure
fto the arguments; all of them are consumed. - lean_
apply_ ⚠9 - Applies the closure
fto the arguments; all of them are consumed. - lean_
apply_ ⚠10 - Applies the closure
fto the arguments; all of them are consumed. - lean_
apply_ ⚠11 - Applies the closure
fto the arguments; all of them are consumed. - lean_
apply_ ⚠12 - Applies the closure
fto the arguments; all of them are consumed. - lean_
apply_ ⚠13 - Applies the closure
fto the arguments; all of them are consumed. - lean_
apply_ ⚠14 - Applies the closure
fto the arguments; all of them are consumed. - lean_
apply_ ⚠15 - Applies the closure
fto the arguments; all of them are consumed. - lean_
apply_ ⚠16 - Applies the closure
fto the arguments; all of them are consumed. - lean_
apply_ ⚠m lean_apply_m: application to more than 16 arguments.- lean_
apply_ ⚠n lean_apply_n.- lean_
apply_ ⚠slice - Applies
f(owned) toargs(owned), aslean_apply_ninapply.cpp. - lean_
closure_ ⚠arity - lean_
closure_ ⚠fun - lean_
closure_ ⚠get - lean_
closure_ ⚠num_ fixed - lean_
closure_ ⚠set - lean_
curry ⚠ - Calls the function
fof a closure with all itsargs.len()arguments (curryinapply.cpp). The arguments are consumed.