Mandrake v0.0.1 Mandrake.Function
Mandrake functional functions.
Summary
Functions
Function that return always the given value
Returns the composition of two functions
Function that do nothing
Call the given function with the given object
Functions
Function that return always the given value.
Examples
iex> printExample = Mandrake.Function.always("Example")
...> printExample.()
"Example"
Returns the composition of two functions.
Examples
iex> printHello = Mandrake.Function.compose(fn x -> "Hello " <> to_string(x) end, fn y -> y + 1 end)
...> printHello.(6)
"Hello 7"