Package fj.data

Class Iteratee.IterV<E,​A>

  • Enclosing class:
    Iteratee

    public abstract static class Iteratee.IterV<E,​A>
    extends java.lang.Object
    A pure iteratee computation which is either done or needs more input
    • Constructor Detail

      • IterV

        IterV()
    • Method Detail

      • run

        public final A run()
      • length

        public static <E> Iteratee.IterV<E,​java.lang.Integer> length()
        An iteratee that counts and consumes the elements of the input
      • drop

        public static <E> Iteratee.IterV<E,​Unit> drop​(int n)
        An iteratee that skips the first n elements of the input
      • head

        public static <E> Iteratee.IterV<E,​Option<E>> head()
        An iteratee that consumes the head of the input
      • peek

        public static <E> Iteratee.IterV<E,​Option<E>> peek()
        An iteratee that returns the first element of the input
      • list

        public static <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. This allows to build a list from 2 iteratees.