View Source Arrays.Implementations.MapArray (Arrays v2.1.1)
An array implementation based on the built-in Map structure.
Summary
Functions
Implementation for FunLand.Mappable.map
.
A variant of reduce that accepts anything that is Combinable as second argument. This Combinable will determine what the empty value and the combining operation will be.
Implementation for FunLand.Reducible.reduce
.
Converts the reducible into a list, by building up a list from all elements, and in the end reversing it.
Functions
Implementation for FunLand.Mappable.map
.
Note that FunLand
is an optional dependency of Arrays
so you need to add it to your mix.exs
dependencies manually to use it.
A variant of reduce that accepts anything that is Combinable as second argument. This Combinable will determine what the empty value and the combining operation will be.
Pass in the combinable module name to start with empty
as accumulator,
or the combinable as struct to use that as starting accumulator.
This is an automatic function implementation, made possible because Arrays.Implementations.MapArray
implements the FunLand.Reducible
behaviour.
See FunLand.Reducible.reduce/2
for examples.
Implementation for FunLand.Reducible.reduce
.
Note that FunLand
is an optional dependency of Arrays
so you need to add it to your mix.exs
dependencies manually to use it.
Converts the reducible into a list, by building up a list from all elements, and in the end reversing it.
This is an automatic function implementation, made possible because Arrays.Implementations.MapArray
implements the FunLand.Reducible
behaviour.