Class Sort<A extends Comparable<A>>
java.lang.Object
com.jnape.palatable.lambda.functions.builtin.fn1.Sort<A>
- Type Parameters:
A
- the input Iterable and output List element type
- All Implemented Interfaces:
Fn1<Iterable<A>,
,List<A>> Applicative<List<A>,
,Fn1<Iterable<A>, ?>> Cartesian<Iterable<A>,
,List<A>, Fn1<?, ?>> Cocartesian<Iterable<A>,
,List<A>, Fn1<?, ?>> Contravariant<Iterable<A>,
,Profunctor<?, List<A>, Fn1<?, ?>>> Functor<List<A>,
,Fn1<Iterable<A>, ?>> Profunctor<Iterable<A>,
,List<A>, Fn1<?, ?>> Monad<List<A>,
,Fn1<Iterable<A>, ?>> MonadReader<Iterable<A>,
,List<A>, Fn1<Iterable<A>, ?>> MonadRec<List<A>,
,Fn1<Iterable<A>, ?>> MonadWriter<Iterable<A>,
List<A>, Fn1<Iterable<A>, ?>>
Given an
Iterable
of Comparable
elements, return a List
of the sorted elements. Note that
this is both eager and monolithic.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckedApply
(Iterable<A> as) Invoke this function with the given argument, potentially throwing anyThrowable
.static <A extends Comparable<A>>
Sort<A> sort()
static <A extends Comparable<A>>
List<A> Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
Sort
private Sort()
-
-
Method Details
-
checkedApply
Description copied from interface:Fn1
Invoke this function with the given argument, potentially throwing anyThrowable
.- Specified by:
checkedApply
in interfaceFn1<Iterable<A extends Comparable<A>>,
List<A extends Comparable<A>>> - Parameters:
as
- the argument- Returns:
- the result of the function application
-
sort
-
sort
-