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

## Class SortBy<A,B extends Comparable<B>>

- java.lang.Object
- - com.jnape.palatable.lambda.functions.builtin.fn2.SortBy<A,B>

- Type Parameters:
    `A` - the input Iterable and output List element type
    `B` - the mapped Comparable type
  All Implemented Interfaces:
    Fn1<Fn1<? super A,? extends B>,Fn1<Iterable<A>,List<A>>>, Fn2<Fn1<? super A,? extends B>,Iterable<A>,List<A>>, Applicative<Fn1<Iterable<A>,List<A>>,Fn1<Fn1<? super A,? extends B>,?>>, Cartesian<Fn1<? super A,? extends B>,Fn1<Iterable<A>,List<A>>,Fn1<?,?>>, Cocartesian<Fn1<? super A,? extends B>,Fn1<Iterable<A>,List<A>>,Fn1<?,?>>, Contravariant<Fn1<? super A,? extends B>,Profunctor<?,Fn1<Iterable<A>,List<A>>,Fn1<?,?>>>, Functor<Fn1<Iterable<A>,List<A>>,Fn1<Fn1<? super A,? extends B>,?>>, Profunctor<Fn1<? super A,? extends B>,Fn1<Iterable<A>,List<A>>,Fn1<?,?>>, Monad<Fn1<Iterable<A>,List<A>>,Fn1<Fn1<? super A,? extends B>,?>>, MonadReader<Fn1<? super A,? extends B>,Fn1<Iterable<A>,List<A>>,Fn1<Fn1<? super A,? extends B>,?>>, MonadRec<Fn1<Iterable<A>,List<A>>,Fn1<Fn1<? super A,? extends B>,?>>, MonadWriter<Fn1<? super A,? extends B>,Fn1<Iterable<A>,List<A>>,Fn1<Fn1<? super A,? extends B>,?>>

      public final class SortBy<A,B extends Comparable<B>>
      extends Object
      implements Fn2<Fn1<? super A,? extends B>,Iterable<A>,List<A>>

  Given an `Iterable` and some mapping function from the `Iterable` element type to some `Comparable` type, produce a sorted `List` of the original elements based on sorting applied to the result of the mapping function. Note that this is both eager and monolithic.
  See Also:
    `Sort`, `SortWith`

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<A>` | `checkedApply(Fn1<? super A,? extends B> fn, Iterable<A> as)`
    `static <A,B extends Comparable<B>> SortBy<A,B>` | `sortBy()`
    `static <A,B extends Comparable<B>> Fn1<Iterable<A>,List<A>>` | `sortBy(Fn1<? super A,? extends B> fn)`
    `static <A,B extends Comparable<B>> List<A>` | `sortBy(Fn1<? super A,? extends B> fn, 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 List<A> checkedApply(Fn1<? super A,? extends B> fn,
                                      Iterable<A> as)

      Specified by:
        `checkedApply` in interface `Fn2<Fn1<? super A,? extends B extends Comparable<B>>,Iterable<A>,List<A>>`

    - #### sortBy

          public static <A,B extends Comparable<B>> SortBy<A,B> sortBy()

    - #### sortBy

          public static <A,B extends Comparable<B>> Fn1<Iterable<A>,List<A>> sortBy(Fn1<? super A,? extends B> fn)

    - #### sortBy

          public static <A,B extends Comparable<B>> List<A> sortBy(Fn1<? super A,? extends B> fn,
                                                                   Iterable<A> as)