All Classes and Interfaces
Class
Description
The
Monoid
instance formed under mutative concatenation for an arbitrary Collection
.Eagerly apply a predicate to each element in an
Iterable
, returning true
if every element
satisfies the predicate, and false
otherwise.A
Monoid
instance formed by Boolean
.Eagerly apply a predicate to each element in an
Iterable
, returning true
if any element
satisfies the predicate, and false
otherwise.An interface representing applicative functors - functors that can have their results combined with other functors
of the same instance in a context-free manner.
Given an
IO
yielding some AutoCloseable
type A
and a kleisli arrow from that type to a
new IO
of type B
, attempt to provision the A
, applying the body operation if
provisioning was successful and ensuring that AutoCloseable.close()
is called regardless of whether the body
succeeds or fails.Given two bounds and a value, return whether or not the value is greater than or equal to the lower bound and less
than or equal to the upper bound.
A dually-parametric functor that maps covariantly over both parameters.
A
Bifunctor
that has both parameter types upper bounded; that is, neither parameters can be mapped to a value
that is not covariant to their respective upper boundsGiven an
IO
that yields some type A
, a cleanup operation to run if a value of that type could be
provisioned, and a kleisli arrow from that type to a new IO
of type B
, produce an
IO
<B>
that, when run, will provision the A
,
flatMap
it to B
, and clean up the original value if it was produced in the
first place.Lazily compute the cartesian product of an
Iterable<A>
and Iterable<B>
,
returning an Iterable<Tuple2<A, B>>
, the products as tuples of
multiplicand A
s and multiplier B
s.Canonical ADT representation of
CoProduct2
.Canonical ADT representation of
CoProduct3
.Canonical ADT representation of
CoProduct4
.Canonical ADT representation of
CoProduct5
.Canonical ADT representation of
CoProduct6
.Canonical ADT representation of
CoProduct7
.Canonical ADT representation of
CoProduct8
.Given two bounds and a value, "clamp" the value between the bounds via the following algorithm:
- if the value is strictly less than the lower bound, return the lower bound
- if the value is strictly greater than the upper bound, return the upper bound
- otherwise, return the value
Given two
Comparable
values of type A
, return true
if the first value is strictly
equal to the second value (according to Comparable.compareTo(Object)
; otherwise, return false.Given a mapping function from some type
A
to some Comparable
type B
and two values
of type A
, return true
if the first value is strictly equal to the second value (according
to Comparable.compareTo(Object)
in terms of their mapped B
results; otherwise, return false.Given a
Comparator
from some type A
and two values of type A
, return
true
if the first value is strictly equal to the second value (according to
Comparator.compare(Object, Object)
otherwise, return false.Lenses that operate on
Collection
s.Given a
Comparator
from some type A
and two values of type A
, return a
ComparisonRelation
of the first value with reference to the second value (according to
Comparator.compare(Object, Object)
.Specialized
CoProduct3
representing the possible results of a ordered comparison.A functor representing the type-level composition of two
Applicative
functors; useful for preserving nested
type-level transformations during traversal of a Traversable
.Prepend an element to an
Iterable
.A (surprisingly useful) functor over some phantom type
B
, retaining a value of type A
that
can be retrieved later.A function that takes two arguments and always returns the first argument.
The contravariant functor (or "co-functor"); that is, a functor that maps contravariantly (
A <- B
)
over its parameter.A generalization of the coproduct of two types.
A generalization of the coproduct of three types.
A generalization of the coproduct of four types.
A generalization of the coproduct of five types.
A generalization of the coproduct of six types.
A generalization of the coproduct of seven types.
A generalization of the coproduct of eight types.
Given an
Iterable
, return an infinite Iterable
that repeatedly cycles its elements, in
order.Covariantly cast a value of type
B
to a value of subtype A
.Lazily skip the first
n
elements from an Iterable
by returning an Iterable
that begins iteration after the nth
element.Lazily limit the
Iterable
by skipping the first contiguous group of elements that satisfy the predicate,
beginning iteration at the first element for which the predicate evaluates to false
.A function returning "no result", and therefore only useful as a side-effect.
The binary tagged union, implemented as a specialized
CoProduct2
.Lenses for
Either
.A
monad transformer
for Either
.A predicate that returns true if
as
is empty; false otherwise.The monoid formed under monadic endomorphism.
Type-safe equality in function form; uses
Object.equals(java.lang.Object)
, not ==
.A profunctor used to extract the isomorphic functions an
Iso
is composed of.Lazily apply a predicate to each element in an
Iterable
, returning an Iterable
of just the
elements for which the predicate evaluated to true
.Iterate the elements in an
Iterable
, applying a predicate to each one, returning the first element that
matches the predicate, wrapped in a Maybe
.A function taking a single argument.
A function taking two arguments.
A function taking three arguments.
A function taking four arguments.
A function taking five arguments.
A function taking six arguments.
A function taking seven arguments.
A function taking eight arguments.
Given an
Iterable
of A
s, a starting value B
, and a
Fn2
<B, A, B>
, iteratively accumulate over the Iterable
, ultimately returning
a final B
value.Deprecated.
An interface for the generic covariant functorial operation
map
over some parameter A
.Given an
Iterable<V>
vs
and a key function V -> K
f
,
fold vs
into a Map<K, List<V>>
by applying f
to each element of
vs
, retaining values that map to the same key in a list, in the order they were iterated in.Given two
Comparable
values of type A
, return true
if the second value is strictly
greater than the first value; otherwise, return false.Given a mapping function from some type
A
to some Comparable
type B
and two values
of type A
, return true
if the second value is strictly greater than the first value in
terms of their mapped B
results; otherwise, return false.Given two
Comparable
values of type A
, return true
if the second value is greater
than or equal to the first value according to Comparable.compareTo(Object)
; otherwise, return false.Given a mapping function from some type
A
to some Comparable
type B
and two values
of type A
, return true
if the second value is greater than or equal to the first value in
terms of their mapped B
results according to Comparable.compareTo(Object)
; otherwise, return
false.Given a
Comparator
from some type A
and two values of type A
,
return true
if the second value is greater than or equal to the first value in
terms of their mapped B
results according to Comparator.compare(Object, Object)
;
otherwise, return false.Given a
Comparator
from some type A
and two values of type A
,
return true
if the second value is strictly greater than the first value in
terms of their mapped B
results; otherwise, return false.An immutable heterogeneous list supporting arbitrary depth type-safety via a linearly recursive type signature.
The consing of a head element to a tail
HList
.The empty
HList
.Lenses that operate on
HList
s.An immutable heterogeneous mapping from a parametrized type-safe key to any value, supporting a minimal mapping
interface.
Lenses that operate on
HMap
s.The identity function.
A functor over some value of type
A
that can be mapped over and retrieved later.A
monad transformer
for Identity
.Internal API.
Internal API.
HList indexes representing a value at arbitrary depth in some compatible HList.
Lazily group the
Iterable
by returning an Iterable
of smaller Iterable
s of
size k
.Lazily inject the provided separator value between each value in the supplied
Iterable
.Given an
Fn1
<A, B>
and a SingletonHList
<A>
, pop the head and
apply it to the function, returning the result.A
Monad
representing some side-effecting computation to be performed.A convenience type with a simplified type signature for common isos with both unified "larger" values and
unified "smaller" values.
Lenses that operate on
Iterable
s.A
monad transformer
over a co-inductive, singly-linked spine of values embedded in effects.An exception thrown when a thread is interrupted while an
Iterator
was blocked.A
Monoid
instance formed by String
that concats two strings together.A
Monad
representing a lazily-computed value.A
monad transformer
for Lazy
.An approximation of van Laarhoven lenses.
A convenience type with a simplified type signature for common lenses with both unified "larger" values and
unified "smaller" values.
Lift into and apply an
Fn2
to two Applicative
values, returning the result inside the same
Applicative
context.Lift into and apply an
Fn3
to three Applicative
values, returning the result inside the same
Applicative
context.Lift into and apply an
Fn4
to four Applicative
values, returning the result inside the same
Applicative
context.Lift into and apply an
Fn5
to five Applicative
values, returning the result inside the same
Applicative
context.Lift into and apply an
Fn6
to six Applicative
values, returning the result inside the same
Applicative
context.Lift into and apply an
Fn7
to seven Applicative
values, returning the result inside the same
Applicative
context.Lenses that operate on
List
s.Given two
Comparable
values of type A
, return true
if the second value is strictly
less than the first value; otherwise, return false.Given a mapping function from some type
A
to some Comparable
type B
and two values
of type A
, return true
if the second value is strictly less than the first value in terms
of their mapped B
results; otherwise, return false.Given two
Comparable
values of type A
, return true
if the second value is less than
or equal to the first value according to Comparable.compareTo(Object)
otherwise, return false.Given a mapping function from some type
A
to some Comparable
type B
and two values
of type A
, return true
if the second value is less than or equal to the first value in
terms of their mapped B
results according to Comparable.compareTo(Object)
; otherwise, return
false.Given a
Comparator
from some type A
and two values of type A
,
return true
if the second value is less than or equal to the first value in
terms of their mapped B
results according to Comparator.compare(Object, Object)
;
otherwise, return false.Given a comparator for some type
A
and two values of type A
,
return true
if the second value is strictly less than than the first value in
terms of their mapped B
results; otherwise, return false.Lazily apply a function to each element in an
Iterable
, producing an Iterable
of the mapped
results.Lenses that operate on
Map
s.A profunctor used to extract the isomorphic functions a
Prism
is composed of.A
Semigroup
over A
that chooses between two values x
and y
via the
following rules:
If x
is strictly less than y
, return y
Otherwise, return x
Given a mapping function from some type
A
to some Comparable
type B
, produce a
Semigroup
over A
that chooses between two values x
and y
via the
following rules:
If x
is strictly less than y
in terms of B
, return y
Otherwise, return x
Given a comparator for some type
A
, produce a Semigroup
over A
that chooses
between two values x
and y
via the following rules:
If x
is strictly less than y
in terms of B
, return y
Otherwise, return x
The optional type, representing a potentially absent value.
Lenses that operate on
Maybe
.A
monad transformer
for Maybe
.A
Monoid
instance formed by Either.merge(com.jnape.palatable.lambda.functions.Fn2<? super L, ? super L, ? extends L>, com.jnape.palatable.lambda.functions.Fn2<? super R, ? super R, ? extends R>, com.jnape.palatable.lambda.adt.Either<L, R>...)
, a semigroup over L
, and a monoid over
R
.A
Monoid
instance formed by merging HMaps
using the chosen
TypeSafeKey
-> Semigroup
mappings
, defaulting to Last
in case no
Semigroup
has been chosen for a given TypeSafeKey
.A
Semigroup
over A
that chooses between two values x
and y
via the
following rules:
If x
is strictly greater than y
, return y
Otherwise, return x
Given a mapping function from some type
A
to some Comparable
type B
, produce a
Semigroup
over A
that chooses between two values x
and y
via the
following rules:
If x
is strictly greater than y
in terms of B
, return y
Otherwise, return x
Given a comparator for some type
A
, produce a Semigroup
over A
that chooses
between two values x
and y
via the following rules:
If x
is strictly greater than y
in terms of B
, return y
Otherwise, return x
Monads are
Applicative
functors that support a flattening operation to unwrap M<M<A>>
-> M<A>
.An interface for
monads
that can be interrupted with some type of error.A monad that is capable of reading an environment
R
and producing a lifted value A
.A class of
monads
that offer a stack-safe interface for performing arbitrarily many
flatmap-like
operations via MonadRec.trampolineM(Fn1)
.A
Monad
that is capable of writing and accumulating state alongside a value, but is not necessarily capable
of simultaneously accessing the state and the value.Negate a predicate function.
A generic supertype representation for profunctor optics.
A
Monoid
instance formed by Boolean
.Given an
Optic
, a function from A
to B
, and a "larger" value S
,
produce a T
by retrieving the A
from the S
, applying the function, and
updating the S
with the B
resulting from the function.Given an
Iterable<A>
as
and a disjoint mapping function a ->
CoProduct2<A, B>
, return a Tuple2
over the lazily unwrapped left A
and right
B
values in the first and second slots, respectively.Deprecated.
in favor of producing an
IO
from the given BoundedBifunctor
and explicitly running itA specialized
Fn1
that returns a Boolean
.Lazily prepend each value with of the
Iterable
with the supplied separator value.Prisms are
Isos
that can fail in one direction.A convenience type with a simplified type signature for common
prism
with unified S/T
and A/B
types.The minimal shape of the combination of two potentially distinctly typed values, supporting destructuring via
explicitly named indexing methods, as well as via a combining function.
A product with three values.
A product with four values.
A product with five values.
A product with six values.
A product with seven values.
A product with eight values.
A dually-parametric functor that maps contravariantly over the left parameter and covariantly over the right.
Generalized, portable
Applicative.pure(Object)
, with a loosened Functor
constraint.Turn an
Optic
with a unary mapping that can be used for setting (e.g.Specialized
CoProduct2
representing the possible results of a primitive recursive function.Given a value, return an infinite
Iterable
that repeatedly iterates that value.Produce an
Iterable
of a value n
times.Given an
Iterable
, return a reversed representation of that Iterable
.A stack-safe
monad transformer
that can safely interpret deeply nested left- or right-associated
binds for any MonadRec
.Given an
Iterable
of A
s, a starting value B
, and a
Fn2
<B, A, B>
, iteratively accumulate over the Iterable
, collecting each
function application result, finally returning an Iterable
of all the results.A lens that focuses on the
heterogeneous list
of values pointed at by one or more
typesafe keys
that must all exist in the same HMap
to be collectively extracted.A
Semigroup
is a closed, associative category.Given a
Traversable
of Applicative
s and a pure Applicative
constructor, traverse the
elements from left to right, zipping the Applicative
s together and collecting the results.Lenses that operate on
Set
s.An interface used to represent an effect that requires no input and produces no output, and therefore is only
perceivable through inspection of some unreported state.
A singleton HList.
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.Given an
Iterable
and a Comparator
over the Iterable
element type, produce a
sorted List
of the original elements based on sorting applied by the Comparator
.The state
Monad
, useful for iteratively building up state and state-contextualized result.The
State
monad transformer
.Like
Const
, but the phantom parameter is in the contravariant position, and the value is in covariant
position.Returns the tail of an
Iterable
; the is, an Iterable
of all the elements except for the
head element.Lazily limit the
Iterable
to n
elements by returning an Iterable
that stops
iteration after the nth
element, or the last element of the Iterable
, whichever comes
first.Lazily limit the
Iterable
to the first group of contiguous elements that satisfy the predicate by
iterating up to, but not including, the first element for which the predicate evaluates to false
.The coproduct of a coproduct (
CoProduct2
<A, B>
) and its product (Tuple2
<A, B>
), represented as a CoProduct3
<A, B, Tuple2
<A,
B>>
.Given some number of times
n
to invoke a function A -> A
, and given an input
A
, iteratively apply the function to the input, and then to the result of the invocation, a total of
n
times, returning the result.Write all the elements of an
Iterable
directly into an array of the specified type.Given an
Fn0
of some Collection
C
, create an instance of C
and add all of
the elements in the provided Iterable
to the instance.Given an
Fn1
<A, CoProduct2
<A, B, ?>>
(analogous to "recurse" and "return"
tail position instructions, respectively), produce a Fn1
<A, B>
that unrolls the original
function by iteratively passing each result that matches the input (A
) back to the original function,
and then terminating on and returning the first output (B
).An interface for a class of data structures that can be "traversed from left to right" in a structure-preserving
way, successively applying some applicative computation to each element and collapsing the results into a single
resulting applicative.
A
Monad
of the evaluation outcome of an expression that might throw.A 2-element tuple product type, implemented as a specialized HList.
A 3-element tuple product type, implemented as a specialized HList.
A 4-element tuple product type, implemented as a specialized HList.
A 5-element tuple product type, implemented as a specialized HList.
A 6-element tuple product type, implemented as a specialized HList.
A 7-element tuple product type, implemented as a specialized HList.
An 8-element tuple product type, implemented as a specialized HList.
Creates a
Tuple2
from two values.An interface representing a parametrized key for use in
HMap
s.The empty return type.
Given a
predicate function
for a value of some type A
and an IO
that yields a value
of type A
, produce an IO
that repeatedly executes the original IO
until the predicate
returns true when applied to the yielded value.Upcast a value of type
B
to a value of type A
that B
extends.The lazy writer monad, a monad capturing some accumulation (eventually to be folded in terms of a given monoid) and
a value.
A
monad transformer
for Writer
.Logical exclusive-or.
Zip together two
Iterable
s into a single Iterable
of Tuple2<A, B>
.Zip together two
Iterable
s by applying a zipping function to the successive elements of each
Iterable
until one of them runs out of elements.
traversing
into anIO
and running it