Function adapton::engine::thunk [] [src]

pub fn thunk<Arg: Hash + Eq + Debug + Clone + 'static, Spurious: Clone + 'static, Res: Hash + Eq + Debug + Clone + 'static>(
    id: NameChoice,
    prog_pt: ProgPt,
    fn_box: Rc<Box<Fn(Arg, Spurious) -> Res>>,
    arg: Arg,
    spurious: Spurious
) -> Art<Res>

Allocates a thunk, an Art<T> that consists of a suspended computation that produces a value of type T.

Use the macros thunk!, memo! and eager! to create and force thunks with less typing.

A full invocation of thunk consists of the following: