/**
  * Returns a NonEmptyList of the sublists of this list.
  *
  * @return a NonEmptyList of the sublists of this list.
  */
 public NonEmptyList<NonEmptyList<A>> sublists() {
   return fromList(
           somes(
               toList()
                   .toStream()
                   .substreams()
                   .map(F1Functions.o(list -> fromList(list), Conversions.<A>Stream_List()))
                   .toList()))
       .some();
 }
 /**
  * Returns a NonEmptyList of the sublists of this list.
  *
  * @return a NonEmptyList of the sublists of this list.
  */
 public NonEmptyList<NonEmptyList<A>> sublists() {
   return fromList(
           somes(
               toList()
                   .toStream()
                   .substreams()
                   .map(
                       F1Functions.o(
                           new F<List<A>, Option<NonEmptyList<A>>>() {
                             public Option<NonEmptyList<A>> f(final List<A> list) {
                               return fromList(list);
                             }
                           },
                           Conversions.<A>Stream_List()))
                   .toList()))
       .some();
 }
Exemple #3
0
 public final <C> Reader<A, C> map(F<B, C> f) {
   return unit(F1Functions.andThen(function, f));
 }