Copyright 2008 - 2010 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg

This software is released under an open source BSD licence.

fj.test
Class Variant

java.lang.Object
  extended by fj.test.Variant

public final class Variant
extends Object

A memoised generator variant. Stores generators that have already been computed for the given arguments.


Method Summary
static
<A> F<Gen<A>,Gen<A>>
variant(long n)
          A curried version of variant(long, Gen).
static
<A> Gen<A>
variant(long n, Gen<A> g)
          Produces a generator that is independent of the given generator using the given value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

variant

public static <A> Gen<A> variant(long n,
                                 Gen<A> g)
Produces a generator that is independent of the given generator using the given value.

Parameters:
n - The value to produce the new generator from.
g - The generator to produce the new generator from.
Returns:
A generator that is independent of the given generator using the given value.

variant

public static <A> F<Gen<A>,Gen<A>> variant(long n)
A curried version of variant(long, Gen).

Parameters:
n - The value to produce the new generator from.
Returns:
A curried version of variant(long, Gen).

Copyright 2008 - 2010 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg

This software is released under an open source BSD licence.