A
- the Iterable element typepublic final class Uncons<A> extends Object implements Fn1<Iterable<A>,Maybe<Tuple2<A,Iterable<A>>>>
Iterable
into a Tuple2
of its head and tail, wrapped in an Maybe
. If the
Iterable
is empty, returns Maybe.nothing()
.Modifier and Type | Method and Description |
---|---|
Maybe<Tuple2<A,Iterable<A>>> |
checkedApply(Iterable<A> as)
Invoke this function with the given argument, potentially throwing any
Throwable . |
static <A> Uncons<A> |
uncons() |
static <A> Maybe<Tuple2<A,Iterable<A>>> |
uncons(Iterable<A> as) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andThen, apply, carry, cartesian, censor, choose, cocartesian, compose, contraMap, diMap, diMapL, diMapR, discardL, discardR, flatMap, fmap, fn1, fromFunction, lazyZip, listens, local, pure, pureFn1, thunk, toFunction, trampolineM, widen, zip, zip