Download the PHP package kikytokamuro/futils without Composer
On this page you can find all versions of the php package kikytokamuro/futils. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package futils
Futils
Functional utils
Examples:
All
Determines whether all elements of the array satisfies the predicate.
Always
Creates a function that always returns a given value.
Any
Determines whether any element of the array satisfies the predicate.
Compose
Function composition (fn -> ... -> f2 -> f1).
Contains
Check whether a value is contained in a array.
Difference
Computes the difference of arrays.
Drop
Drops the first n elements off the front of the array.
Filter
Filters elements of an array using a callback function.
Find
Find first element of the array satisfies the predicate.
Flatten
Flattens nested arrays.
Has
Check if exists element with this key in array.
Head
Get head of array.
IndexOf
Get first index of value in array.
Join
Join array elements with a string.
Last
Get last element of array.
Map
Applying function to each element of array.
Merge
Merge two arrays.
Partial
Create partial function.
Partition
Equivalent to [(filter f, arr), (reject f, arr)]
Pipe
Function composition (f1 -> f2 -> ... -> fn).
Reduce
Reduce the array to a single value using a callback function.
Reject
Like filter, but the new array is composed of all the items which fail the function.
Replace
Replaces elements from passed arrays into the first array.
Tail
Get tail of array
Take
Get n first elements from array.
When
Only when predicate is true then appling function to argument, else return argument.
Zip
Zips together its two arguments into a array of arrays.
Monads
IdentityMonad - Just annotates plain values and functions to satisfy the monad laws.
MaybeMonad - Encapsulates the type of an undefined value.
ListMonad - Abstracts away the concept of a list of items.