module Functions::Prelude

Constants

After

composes two functions in reverse sequence

AfterCurried

manually curried Version of the After composition function

Average
Chain

reduce a list of functions right to left

Compose

composes two functions

ComposeCurried

manually curried version of the Compose function

Const

the constant function

Count

count_by = ->(f) { group_by.( f ) < map_hash.( send.(:length) ) }

CountBy
Divide
Divisors
Filter
Flatten

Flattens an array

@param [#flatten] the array to flatten

Foldl
Foldr
FromOneTo
FromTo
Gcd
GcdA
Group
Id

the identity function

Intersect
IsDivisor
Lcm
LcmA
Length

Returns the length

Map
MapHash
Max
Maybe

make a function resilient to nil inputs

Merge

merges two list by the natural comparison operator <

MergeBy

merges two ordered lists by a function f that compares the values if no function is given the values are compared by the “<” operator

MergeHash
MergeSort
MergeSortBy
Min
Multiply
Pair
Par
Partition

TODO investigate semantics

Power
QuickSort
QuickSortBy

Merge_Sort_By.partial(Identity)

ReduceLeft
ReduceRight
Reverse

Reverses an array

@param [#reverse] the array to reverse

Send

sends the message m to an object o

@param [Symbol] the method to be called on the object o @return the result of calling the message m on the object o

SplitIn

splits a list xs in peices of size n

SplitInHalf

splits a list in half

Sum
To_Float
Values
Zip
ZipHashInner
ZipHashLeft
ZipHashRight