Package com.jnape.palatable.lambda.functions.recursion
-
Class Summary Class Description RecursiveResult<A,B> SpecializedCoProduct2representing the possible results of a primitive recursive function.RecursiveResult.Recurse<A,B> RecursiveResult.Terminate<A,B> Trampoline<A,B> Given an(analogous to "recurse" and "return" tail position instructions, respectively), produce aFn1<A,CoProduct2<A, B, ?>>that unrolls the original function by iteratively passing each result that matches the input (Fn1<A, B>A) back to the original function, and then terminating on and returning the first output (B).