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


package com.jnape.palatable.lambda.functions.builtin.fn2
  • Classes
    Class
    Description
    $<A,B>
    Function application, represented as a higher-order Fn2 that receives an Fn1 and its argument, and applies it.
    All<A>
    Eagerly apply a predicate to each element in an Iterable, returning true if every element satisfies the predicate, and false otherwise.
    Given an Effect<A> and some A, produce an IO that, when run, performs the effect on A and returns it.
    Any<A>
    Eagerly apply a predicate to each element in an Iterable, returning true if any element satisfies the predicate, and false otherwise.
    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<A,B,C>
    Given two functions f and g, produce a Fn1<A, Tuple2<B, C>> (the dual application of both functions).
    Lazily compute the cartesian product of an Iterable<A> and Iterable<B>, returning an Iterable<Tuple2<A, B>>, the products as tuples of multiplicand As and multiplier Bs.
    CmpEq<A extends Comparable<A>>
    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<A>
    Prepend an element to an Iterable.
    Given two Iterables xs and ys, return the distinct elements of xs that are not in ys.
    Drop<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.
    Eq<A>
    Type-safe equality in function form; uses Object.equals(java.lang.Object), not ==.
    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<A>
    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<K,V>
    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<A extends Comparable<A>>
    Given two Comparable values of type A, return true if the second value is strictly greater than the first value; otherwise, return false.
    GTE<A extends Comparable<A>>
    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.
    Lazily group the Iterable by returning an Iterable of smaller Iterables of size k.
    Lazily inject the provided separator value between each value in the supplied Iterable.
    Into<A,B,C>
    Given an Fn2<A, B, C> and a Map.Entry<A, B>, destructure the entry and apply the key and value as arguments to the function, returning the result.
    Into1<A,B>
    Given an Fn1<A, B> and a SingletonHList<A>, pop the head and apply it to the function, returning the result.
    Into3<A,B,C,D>
    Given an Fn3<A, B, C, D> and a Product3<A, B, C>, destructure the product and apply the slots as arguments to the function, returning the result.
    Into4<A,B,C,D,E>
    Given an Fn4<A, B, C, D, E> and a Product4<A, B, C, D>, destructure the product and apply the slots as arguments to the function, returning the result.
    Into5<A,B,C,D,E,F>
    Given an Fn5<A, B, C, D, E, F> and a Product5<A, B, C, D, E>, destructure the product and apply the slots as arguments to the function, returning the result.
    Into6<A,B,C,D,E,F,G>
    Given an Fn6<A, B, C, D, E, F, G> and a Product6<A, B, C, D, E, F>, destructure the product and apply the slots as arguments to the function, returning the result.
    Into7<A,B,C,D,E,F,G,H>
    Given an Fn7<A, B, C, D, E, F, G, H> and a Product7<A, B, C, D, E, F, G>, destructure the product and apply the slots as arguments to the function, returning the result.
    Into8<A,B,C,D,E,F,G,H,I>
    Given an Fn8<A, B, C, D, E, F, G, H, I> and a Product8<A, B, C, D, E, F, G, H>, destructure the product and apply the slots as arguments to the function, returning the result.
    Lazily generate an infinite Iterable from the successive applications of the function first to the initial seed value, then to the result, and so on; i.e., the result of iterate(x -> x + 1, 0) would produce an infinite Iterable over the elements 0, 1, 2, 3, ...
    LazyRec<A,B>
    Given a Fn2 that receives a recursive function and an input and yields a lazy result, and an input, produce a lazy result that, when forced, will recursively invoke the function until it terminates in a stack-safe way.
    LT<A extends Comparable<A>>
    Given two Comparable values of type A, return true if the second value is strictly less than the first value; otherwise, return false.
    LTE<A extends Comparable<A>>
    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 binary predicate and an Iterable<A>, return an Iterable<Iterable<A>> of the contiguous groups of elements that match the predicate pairwise.
    Map<A,B>
    Lazily apply a function to each element in an Iterable, producing an Iterable of the mapped results.
    Partition<A,B,C>
    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<A,FA extends Functor<A,?>>
    Deprecated.
    in favor of producing an IO from the given Functor and explicitly running it
    Peek2<A,B,FAB extends BoundedBifunctor<A,B,? super A,? super B,?>>
    Deprecated.
    in favor of producing an IO from the given BoundedBifunctor and explicitly running it
    Lazily prepend each value with of the Iterable with the supplied separator value.
    Given an Iterable<A> and a Fn2<A, A, A>, iteratively accumulate over the Iterable, returning Maybe<A>.
    Given an Iterable<A> and a Fn2<A, A, A>, iteratively accumulate over the Iterable, returning Maybe<A>.
    Produce an Iterable of a value n times.
    Sequence<A,App extends Applicative<?,App>,Trav extends Traversable<?,Trav>,TravA extends Traversable<A,Trav>,AppTrav extends Applicative<TravA,App>>
    Given a Traversable of Applicatives and a pure Applicative constructor, traverse the elements from left to right, zipping the Applicatives together and collecting the results.
    Given an Iterable<A>, "slide" a window of k elements across the Iterable by one element at a time, returning an Iterable<Iterable<A>>.
    Snoc<A>
    Opposite of Cons: lazily append an element to the end of the given Iterable.
    SortBy<A,B extends Comparable<B>>
    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.
    Span<A>
    Given a predicate, return a Tuple2 where the first slot is the front contiguous elements of an Iterable matching the predicate and the second slot is all the remaining elements.
    Take<A>
    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.
    Write all the elements of an Iterable directly into an array of the specified type.
    ToCollection<A,C extends Collection<A>>
    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<K,V,M extends Map<K,V>>
    Given an Fn0 of some Map M, create an instance of M and put all of the entries in the provided Iterable into the instance.
    Tupler2<A,B>
    Creates a Tuple2 from two values.
    Unfoldr<A,B>
    Given an initial seed value and a function that takes the seed type and produces an Maybe<Tuple2<X, Seed>>, where the tuple's first slot represents the next Iterable element, and the second slot represents the next input to the unfolding function, unfold an Iterable of Xs.
    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<A,B>
    Zip together two Iterables into a single Iterable of Tuple2<A, B>.