Package fj.data
Class Iteratee.IterV<E,A>
java.lang.Object
fj.data.Iteratee.IterV<E,A>
- Enclosing class:
Iteratee
A pure iteratee computation which is either done or needs more input
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal <B> Iteratee.IterV
<E, B> bind
(F<A, Iteratee.IterV<E, B>> f) TODO more documentationstatic <E,
A> Iteratee.IterV <E, A> cont
(F<Iteratee.Input<E>, Iteratee.IterV<E, A>> f) A computation that takes an element from an input to yield a new computationstatic <E,
A> Iteratee.IterV <E, A> done
(A a, Iteratee.Input<E> i) A computation that has finishedstatic <E> Iteratee.IterV
<E, Unit> drop
(int n) An iteratee that skips the first n elements of the inputabstract <Z> Z
fold
(F<P2<A, Iteratee.Input<E>>, Z> done, F<F<Iteratee.Input<E>, Iteratee.IterV<E, A>>, Z> cont) static <E> Iteratee.IterV
<E, Option<E>> head()
An iteratee that consumes the head of the inputstatic <E> Iteratee.IterV
<E, Integer> length()
An iteratee that counts and consumes the elements of the inputstatic <E> Iteratee.IterV
<E, List<E>> list()
An iteratee that consumes the input elements and returns them as a list in reverse order, so that the last line is the first element.static <E> Iteratee.IterV
<E, Option<E>> peek()
An iteratee that returns the first element of the inputfinal A
run()
-
Constructor Details
-
IterV
IterV()
-
-
Method Details
-
cont
A computation that takes an element from an input to yield a new computation -
fold
public abstract <Z> Z fold(F<P2<A, Iteratee.Input<E>>, Z> done, F<F<Iteratee.Input<E>, Iteratee.IterV<E, A>>, Z> cont) -
done
A computation that has finished -
run
-
bind
TODO more documentation -
length
An iteratee that counts and consumes the elements of the input -
drop
An iteratee that skips the first n elements of the input -
head
An iteratee that consumes the head of the input -
peek
An iteratee that returns the first element of the input -
list
An iteratee that consumes the input elements and returns them as a list in reverse order, so that the last line is the first element. This allows to build a list from 2 iteratees.
-