fp
Class Cons2<T>

java.lang.Object
  extended by fp.Cons2<T>
All Implemented Interfaces:
ILambda2<IList<T>,T,IList<T>>

public class Cons2<T>
extends java.lang.Object
implements ILambda2<IList<T>,T,IList<T>>

Makes new NEList given a first and rest. Use binary lambda.


Field Summary
(package private)  IListFactory<T> _fac
           
 
Constructor Summary
Cons2(IListFactory<T> fac)
           
 
Method Summary
 IList<T> apply(T first, IList<T> rest)
          Creates an NEList with a given first and rest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_fac

IListFactory<T> _fac
Constructor Detail

Cons2

public Cons2(IListFactory<T> fac)
Method Detail

apply

public IList<T> apply(T first,
                      IList<T> rest)
Creates an NEList with a given first and rest.

Specified by:
apply in interface ILambda2<IList<T>,T,IList<T>>
Parameters:
first - the first element of the IList to be created.
rest - an IList, the rest of the IList to be created.
Returns:
IList