package fp; import listFW.*; import listFW.factory.*; /** * Makes new NEList given a first and rest. Use binary lambda. * @author DXN * @author Mathias Ricken - Copyright 2008 - All rights reserved. */ public class Cons2 implements ILambda2,T,IList> { IListFactory _fac; public Cons2(IListFactory fac) { _fac = fac; } /** * Creates an NEList with a given first and rest. * @param first the first element of the IList to be created. * @param rest an IList, the rest of the IList to be created. * @return IList */ public IList apply(T first, IList rest) { return _fac.makeNEList(first, rest); } }