Struct tramp::Thunk[][src]

pub struct Thunk<'a, 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<'a, T> Thunk<'a, 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<'a, T> Debug for Thunk<'a, T>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a, T> !Send for Thunk<'a, T>

impl<'a, T> !Sync for Thunk<'a, T>