Struct tramp::Thunk[][src]

pub struct Thunk<T> { /* fields omitted */ }

A delayed computation. This can be used in lazy evaluation environments. Also, it is used to delay a tail call and emulate TCO (tail call optimization).

Methods

impl<T> Thunk<T>
[src]

Creates a new thunk from the given function. Probably you will end up passing closures to this function.

Computes the result of this thunk, i.e. forces evaluation to happen.

Trait Implementations

impl<T> Debug for Thunk<T>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<T> !Send for Thunk<T>

impl<T> !Sync for Thunk<T>