Package fj.data

Class Stream.Cons<A>

java.lang.Object
fj.data.Stream<A>
fj.data.Stream.Cons<A>
All Implemented Interfaces:
Iterable<A>
Enclosing class:
Stream<A>

private static final class Stream.Cons<A> extends Stream<A>
  • Field Details

    • tail

      private final P1<Stream<A>> tail
  • Constructor Details

  • Method Details

    • head

      public A head()
      Description copied from class: Stream
      The first element of the stream or fails for the empty stream.
      Specified by:
      head in class Stream<A>
      Returns:
      The first element of the stream or fails for the empty stream.
    • tail

      public P1<Stream<A>> tail()
      Description copied from class: Stream
      The stream without the first element or fails for the empty stream.
      Specified by:
      tail in class Stream<A>
      Returns:
      The stream without the first element or fails for the empty stream.