java.lang.Object
com.jnape.palatable.lambda.functions.builtin.fn1.Tail<A>
Type Parameters:
A - the Iterable element type
All Implemented Interfaces:
Fn1<Iterable<A>,Iterable<A>>, Applicative<Iterable<A>,Fn1<Iterable<A>,?>>, Cartesian<Iterable<A>,Iterable<A>,Fn1<?,?>>, Cocartesian<Iterable<A>,Iterable<A>,Fn1<?,?>>, Contravariant<Iterable<A>,Profunctor<?,Iterable<A>,Fn1<?,?>>>, Functor<Iterable<A>,Fn1<Iterable<A>,?>>, Profunctor<Iterable<A>,Iterable<A>,Fn1<?,?>>, Monad<Iterable<A>,Fn1<Iterable<A>,?>>, MonadReader<Iterable<A>,Iterable<A>,Fn1<Iterable<A>,?>>, MonadRec<Iterable<A>,Fn1<Iterable<A>,?>>, MonadWriter<Iterable<A>,Iterable<A>,Fn1<Iterable<A>,?>>

public final class Tail<A> extends Object implements Fn1<Iterable<A>,Iterable<A>>
Returns the tail of an Iterable; the is, an Iterable of all the elements except for the head element. If the input Iterable is empty, the result is also an empty Iterable;
  • Field Details

    • INSTANCE

      private static final Tail<?> INSTANCE
  • Constructor Details

    • Tail

      private Tail()
  • Method Details

    • checkedApply

      public Iterable<A> checkedApply(Iterable<A> as)
      Description copied from interface: Fn1
      Invoke this function with the given argument, potentially throwing any Throwable.
      Specified by:
      checkedApply in interface Fn1<Iterable<A>,Iterable<A>>
      Parameters:
      as - the argument
      Returns:
      the result of the function application
    • tail

      public static <A> Tail<A> tail()
    • tail

      public static <A> Iterable<A> tail(Iterable<A> as)