Package com.jnape.palatable.lambda.functions.builtin.fn2
package com.jnape.palatable.lambda.functions.builtin.fn2
-
ClassesClassDescription$<A,
B> All<A>Eagerly apply a predicate to each element in anIterable, returningtrueif every element satisfies the predicate, andfalseotherwise.Alter<A>Any<A>Eagerly apply a predicate to each element in anIterable, returningtrueif any element satisfies the predicate, andfalseotherwise.Given anIOyielding someAutoCloseabletypeAand a kleisli arrow from that type to a newIOof typeB, attempt to provision theA, applying the body operation if provisioning was successful and ensuring thatAutoCloseable.close()is called regardless of whether the body succeeds or fails.Both<A,B, C> CartesianProduct<A,B> Lazily compute the cartesian product of anIterable<A>andIterable<B>, returning anIterable<Tuple2<A, B>>, the products as tuples of multiplicandAs and multiplierBs.CmpEq<A extends Comparable<A>>Given twoComparablevalues of typeA, returntrueif the first value is strictly equal to the second value (according toComparable.compareTo(Object); otherwise, return false.Cons<A>Prepend an element to anIterable.Difference<A>Drop<A>Lazily skip the firstnelements from anIterableby returning anIterablethat begins iteration after thenthelement.DropWhile<A>Lazily limit theIterableby skipping the first contiguous group of elements that satisfy the predicate, beginning iteration at the first element for which the predicate evaluates tofalse.Eq<A>Type-safe equality in function form; usesObject.equals(java.lang.Object), not==.Filter<A>Lazily apply a predicate to each element in anIterable, returning anIterableof just the elements for which the predicate evaluated totrue.Find<A>Iterate the elements in anIterable, applying a predicate to each one, returning the first element that matches the predicate, wrapped in aMaybe.GroupBy<K,V> Given anIterable<V>vsand a key functionV -> Kf, foldvsinto aMap<K, List<V>>by applyingfto each element ofvs, retaining values that map to the same key in a list, in the order they were iterated in.GT<A extends Comparable<A>>Given twoComparablevalues of typeA, returntrueif the second value is strictly greater than the first value; otherwise, return false.GTE<A extends Comparable<A>>Given twoComparablevalues of typeA, returntrueif the second value is greater than or equal to the first value according toComparable.compareTo(Object); otherwise, return false.InGroupsOf<A>Lazily group theIterableby returning anIterableof smallerIterables of sizek.Intersperse<A>Lazily inject the provided separator value between each value in the suppliedIterable.Into<A,B, C> Into1<A,B> Given anand aFn1<A, B>, pop the head and apply it to the function, returning the result.SingletonHList<A>Into3<A,B, C, D> Into4<A,B, C, D, E> Into5<A,B, C, D, E, F> Into6<A,B, C, D, E, F, G> Into7<A,B, C, D, E, F, G, H> Into8<A,B, C, D, E, F, G, H, I> Iterate<A>LazyRec<A,B> LT<A extends Comparable<A>>Given twoComparablevalues of typeA, returntrueif the second value is strictly less than the first value; otherwise, return false.LTE<A extends Comparable<A>>Given twoComparablevalues of typeA, returntrueif the second value is less than or equal to the first value according toComparable.compareTo(Object)otherwise, return false.MagnetizeBy<A>Map<A,B> Lazily apply a function to each element in anIterable, producing anIterableof the mapped results.Partition<A,B, C> Given anIterable<A>asand a disjoint mapping functiona -> CoProduct2<A, B>, return aTuple2over the lazily unwrapped leftAand rightBvalues in the first and second slots, respectively.Deprecated.Peek2<A,B, FAB extends BoundedBifunctor<A, B, ? super A, ? super B, ?>> Deprecated.in favor of producing anIOfrom the givenBoundedBifunctorand explicitly running itPrependAll<A>Lazily prepend each value with of theIterablewith the supplied separator value.ReduceLeft<A>ReduceRight<A>Replicate<A>Produce anIterableof a valuentimes.Sequence<A,App extends Applicative<?, App>, Trav extends Traversable<?, Trav>, TravA extends Traversable<A, Trav>, AppTrav extends Applicative<TravA, App>> Given aTraversableofApplicatives and a pureApplicativeconstructor, traverse the elements from left to right, zipping theApplicatives together and collecting the results.Slide<A>Snoc<A>SortBy<A,B extends Comparable<B>> Given anIterableand some mapping function from theIterableelement type to someComparabletype, produce a sortedListof the original elements based on sorting applied to the result of the mapping function.SortWith<A>Given anIterableand aComparatorover theIterableelement type, produce a sortedListof the original elements based on sorting applied by theComparator.Span<A>Take<A>Lazily limit theIterabletonelements by returning anIterablethat stops iteration after thenthelement, or the last element of theIterable, whichever comes first.TakeWhile<A>Lazily limit theIterableto 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 tofalse.ToArray<A>Write all the elements of anIterabledirectly into an array of the specified type.ToCollection<A,C extends Collection<A>> Given anFn0of someCollectionC, create an instance ofCand add all of the elements in the providedIterableto the instance.Tupler2<A,B> Creates aTuple2from two values.Unfoldr<A,B> Until<A>Given apredicate functionfor a value of some typeAand anIOthat yields a value of typeA, produce anIOthat repeatedly executes the originalIOuntil the predicate returns true when applied to the yielded value.Zip<A,B> Zip together twoIterables into a singleIterableofTuple2<A, B>.
IOfrom the givenFunctorand explicitly running it