ref_send API 2.17
defensive programming in Java

org.waterken.factorial
Class Factorial

java.lang.Object
  extended by org.waterken.factorial.Factorial

public final class Factorial
extends java.lang.Object

A tail recursive factorial implementation.


Nested Class Summary
static interface Factorial.Recursion
          The inner loop of a tail recursive factorial implementation.
 
Method Summary
static Promise<java.lang.Integer> make(Eventual _, int n)
          Computes a factorial.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

make

public static Promise<java.lang.Integer> make(Eventual _,
                                              int n)
Computes a factorial.

Parameters:
_ - eventual operator
n - >= 0
Returns:
promise for the factorial of n

ref_send API 2.17
defensive programming in Java

Submit a bug or feature, or get help

Copyright 1998-2009 Waterken Inc. under the terms of the MIT X license.