com.jnape.palatable.lambda.functions.builtin.fn2

## Class InGroupsOf<A>

- java.lang.Object
- - com.jnape.palatable.lambda.functions.builtin.fn2.InGroupsOf<A>

- Type Parameters:
    `A` - The Iterable element type
  All Implemented Interfaces:
    Fn1<Integer,Fn1<Iterable<A>,Iterable<Iterable<A>>>>, Fn2<Integer,Iterable<A>,Iterable<Iterable<A>>>, Applicative<Fn1<Iterable<A>,Iterable<Iterable<A>>>,Fn1<Integer,?>>, Cartesian<Integer,Fn1<Iterable<A>,Iterable<Iterable<A>>>,Fn1<?,?>>, Cocartesian<Integer,Fn1<Iterable<A>,Iterable<Iterable<A>>>,Fn1<?,?>>, Contravariant<Integer,Profunctor<?,Fn1<Iterable<A>,Iterable<Iterable<A>>>,Fn1<?,?>>>, Functor<Fn1<Iterable<A>,Iterable<Iterable<A>>>,Fn1<Integer,?>>, Profunctor<Integer,Fn1<Iterable<A>,Iterable<Iterable<A>>>,Fn1<?,?>>, Monad<Fn1<Iterable<A>,Iterable<Iterable<A>>>,Fn1<Integer,?>>, MonadReader<Integer,Fn1<Iterable<A>,Iterable<Iterable<A>>>,Fn1<Integer,?>>, MonadRec<Fn1<Iterable<A>,Iterable<Iterable<A>>>,Fn1<Integer,?>>, MonadWriter<Integer,Fn1<Iterable<A>,Iterable<Iterable<A>>>,Fn1<Integer,?>>

      public final class InGroupsOf<A>
      extends Object
      implements Fn2<Integer,Iterable<A>,Iterable<Iterable<A>>>

  Lazily group the `Iterable` by returning an `Iterable` of smaller `Iterable`s of size `k`. Note that groups are not padded; that is, if `k >= n`, where `n` is the number of remaining elements, the final `Iterable` will have only `n` elements.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Iterable<Iterable<A>>` | `checkedApply(Integer k, Iterable<A> as)`
    `static <A> InGroupsOf<A>` | `inGroupsOf()`
    `static <A> Fn1<Iterable<A>,Iterable<Iterable<A>>>` | `inGroupsOf(Integer k)`
    `static <A> Iterable<Iterable<A>>` | `inGroupsOf(Integer k, Iterable<A> as)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.jnape.palatable.lambda.functions.Fn2

      `apply, apply, checkedApply, compose, contraMap, curried, curry, diMapL, discardR, flip, fn2, fromBiFunction, toBiFunction, uncurry, widen`

    - ### Methods inherited from interface com.jnape.palatable.lambda.functions.Fn1

      `andThen, carry, cartesian, censor, choose, cocartesian, diMap, diMapR, discardL, flatMap, fmap, fn1, fromFunction, lazyZip, listens, local, pure, pureFn1, thunk, toFunction, trampolineM, zip, zip`

    - ### Methods inherited from interface com.jnape.palatable.lambda.monad.Monad

      `join`

    - ### Methods inherited from interface com.jnape.palatable.lambda.functor.Functor

      `coerce`

- - ### Method Detail

    - #### checkedApply

          public Iterable<Iterable<A>> checkedApply(Integer k,
                                                    Iterable<A> as)

      Specified by:
        `checkedApply` in interface `Fn2<Integer,Iterable<A>,Iterable<Iterable<A>>>`

    - #### inGroupsOf

          public static <A> InGroupsOf<A> inGroupsOf()

    - #### inGroupsOf

          public static <A> Fn1<Iterable<A>,Iterable<Iterable<A>>> inGroupsOf(Integer k)

    - #### inGroupsOf

          public static <A> Iterable<Iterable<A>> inGroupsOf(Integer k,
                                                             Iterable<A> as)