package trampoline

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Trampoline.Not_a_trampolineSource

If you don't want to use trampolines because you're sure that your stack is large enough but you have a functor that depends on the Trampoline module then you can use Not_a_trampoline to use the stack instead of trampolines.

Sourcetype 'a t

The type of the trampoline, e g the return type of tail-recursive functions.

Sourceval execute : 'a t -> 'a

Performs all suspended computations.

Sourceval return : 'a -> 'a t

Turns a literal value into a trampoline.

Sourceval suspend : (unit -> 'a t) -> 'a t

Delays the computation of a result.

Sourceval recursive_call : ('a -> 'b t) -> 'a -> 'b t

Convenience function for recursive calls with one argument.

Sourceval bind : 'a t -> ('a -> 'b t) -> 'b t

Accesses values from suspended computations to create new suspended computations.

Sourceval map : ('a -> 'b) -> 'a t -> 'b t

Convenience function so you don't have to use bind when you want to have a simple map.