Package fj.data

Class List.Cons<A>

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

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

    • tail

      private List<A> tail
  • Constructor Details

    • Cons

      Cons(A head, List<A> tail)
  • Method Details

    • head

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

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

      private void tail(List<A> tail)