Copyright 2008 - 2009 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.data.hlist
Class HList.Apply<F$,A,R>

java.lang.Object
  extended by fj.data.hlist.HList.Apply<F$,A,R>
Type Parameters:
F$ - The type of the function to apply.
A - The domain of the function.
R - The function's codomain.
Enclosing class:
HList<A extends HList<A>>

public abstract static class HList.Apply<F$,A,R>
extends Object

Type-level function application operators.


Constructor Summary
HList.Apply()
           
 
Method Summary
static
<A,B,C> HList.Apply<HList.HAppend<A,B,C>,P2<A,B>,C>
append()
          A function application operator for concatenating heterogeneous lists.
abstract  R apply(F$ f, A a)
           
static
<X,Y,Z> HList.Apply<Unit,P2<F<X,Y>,F<Y,Z>>,F<X,Z>>
comp()
          A function application operator for function composition.
static
<E,L extends HList<L>>
HList.Apply<Unit,P2<E,L>,HList.HCons<E,L>>
cons()
          An operator for the construction of heterogeneous lists.
static
<X,Y> HList.Apply<F<X,Y>,X,Y>
f()
          Function application operator.
static
<X> HList.Apply<Unit,X,X>
id()
          Identity operator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HList.Apply

public HList.Apply()
Method Detail

apply

public abstract R apply(F$ f,
                        A a)

f

public static <X,Y> HList.Apply<F<X,Y>,X,Y> f()
Function application operator.

Returns:
an operator that applies a given function to a given argument.

id

public static <X> HList.Apply<Unit,X,X> id()
Identity operator

Returns:
An operator that returns its second argument no matter which function is being applied.

comp

public static <X,Y,Z> HList.Apply<Unit,P2<F<X,Y>,F<Y,Z>>,F<X,Z>> comp()
A function application operator for function composition.

Type Parameters:
X - The domain.
Y - The type through which to compose.
Z - The codomain.
Returns:
an operator that composes functions.

cons

public static <E,L extends HList<L>> HList.Apply<Unit,P2<E,L>,HList.HCons<E,L>> cons()
An operator for the construction of heterogeneous lists.

Returns:
an operator that constructs heterogeneous lists.

append

public static <A,B,C> HList.Apply<HList.HAppend<A,B,C>,P2<A,B>,C> append()
A function application operator for concatenating heterogeneous lists.

Type Parameters:
A - The type of the list to which to append.
B - The type of the list to append.
C - The type of the concatenated list.
Returns:
an operator that concatenates heterogeneous lists.

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

This software is released under an open source BSD licence.