Skip to main content

apply_with

Function apply_with 

Source
pub fn apply_with(f: &Value, arg: Value, ctx: &Ctx) -> Result<Value, Raised>
Expand description

Apply a value to a single argument under a caller-supplied Ctx. Identical to apply except that the context comes from the caller, so the identities minted by the call continue that context’s id source instead of restarting at zero. A host that hands callables out and takes them back needs it (e.g. elly.Fun.__call__ on a closure materialized out of a module), or an item and an unrelated closure could be handed the same id.