|
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. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfj.data.hlist.HList.HFoldr<G,V,L,R>
G
- The type of the function with which to fold.V
- The type of the value to be substituted for the empty list.L
- The type of the heterogeneous list to be folded.R
- The return type of the fold.public static class HList.HFoldr<G,V,L,R>
The catamorphism over heterogeneous lists.
Method Summary | ||
---|---|---|
R |
foldRight(G f,
V v,
L l)
Folds a non-empty heterogeneous list. |
|
static
|
hFoldr()
A fold instance for the empty list. |
|
static
|
hFoldr(PP p,
H h)
A fold instance for a non-empty heterogeneous list |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <G,V> HList.HFoldr<G,V,HList.HNil,V> hFoldr()
G
- The type of the function with which to fold.V
- The type of value that this fold returns.
public static <E,G,V,L extends HList<L>,R,RR,H extends HList.HFoldr<G,V,L,R>,PP extends HList.Apply<G,P2<E,R>,RR>> HList.HFoldr<G,V,HList.HCons<E,L>,RR> hFoldr(PP p, H h)
E
- The type of the head of the list.G
- The type of function to apply to the head of the list and the fold of its tail.V
- The type of value to substitute for the empty list.L
- The type of the tail of the list.R
- The type of the fold of the tail of the list.RR
- The return type of the fold.H
- The type of the fold instance for the tail of the list.PP
- The type of the given function application operator.p
- An operator that applies a function on the head of the list and the fold of its tail.h
- A fold instance for the tail of the list.
public R foldRight(G f, V v, L l)
f
- A function with which to fold.v
- The value to substitute for the empty list.l
- The heterogeneous list to be folded.
|
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. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |