Package | Description |
---|---|
com.jnape.palatable.lambda.functions.builtin.fn2 |
Class and Description |
---|
All
Eagerly apply a predicate to each element in an
Iterable , returning true if every element
satisfies the predicate, and false otherwise. |
Alter |
Any
Eagerly apply a predicate to each element in an
Iterable , returning true if any element
satisfies the predicate, and false otherwise. |
AutoBracket
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. |
Both |
CartesianProduct
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. |
CmpEq
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. |
Cons
Prepend an element to an
Iterable . |
Difference |
Drop
Lazily skip the first
n elements from an Iterable by returning an Iterable
that begins iteration after the nth element. |
DropWhile
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 . |
Eq
Type-safe equality in function form; uses
Object.equals(java.lang.Object) , not == . |
Filter
Lazily apply a predicate to each element in an
Iterable , returning an Iterable of just the
elements for which the predicate evaluated to true . |
Find
Iterate the elements in an
Iterable , applying a predicate to each one, returning the first element that
matches the predicate, wrapped in a Maybe . |
GroupBy
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. |
GT
Given two
Comparable values of type A , return true if the second value is strictly
greater than the first value; otherwise, return false. |
GTE
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. |
InGroupsOf
Lazily group the
Iterable by returning an Iterable of smaller Iterable s of
size k . |
Intersperse
Lazily inject the provided separator value between each value in the supplied
Iterable . |
Into
Given an
and a , destructure the
entry and apply the key and value as arguments to the function, returning the result. |
Into1
Given an
and a , pop the head and
apply it to the function, returning the result. |
Into3 |
Into4 |
Into5 |
Into6 |
Into7 |
Into8 |
Iterate |
LazyRec |
LT
Given two
Comparable values of type A , return true if the second value is strictly
less than the first value; otherwise, return false. |
LTE
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. |
MagnetizeBy |
Map
Lazily apply a function to each element in an
Iterable , producing an Iterable of the mapped
results. |
Partition
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. |
Peek |
Peek2
Deprecated.
in favor of producing an
IO from the given BoundedBifunctor and explicitly running it |
PrependAll
Lazily prepend each value with of the
Iterable with the supplied separator value. |
ReduceLeft |
ReduceRight |
Replicate
Produce an
Iterable of a value n times. |
Sequence
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. |
Slide |
Snoc |
SortBy
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. |
SortWith
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 . |
Span |
Take
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. |
TakeWhile
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 . |
ToArray
Write all the elements of an
Iterable directly into an array of the specified type. |
ToCollection
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. |
ToMap |
Tupler2
Creates a
Tuple2 from two values. |
Unfoldr |
Until
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. |
Zip
Zip together two
Iterable s into a single Iterable of Tuple2<A, B> . |