FunLand.Builtin.MapSet (fun_land v0.10.0)

Link to this section Summary

Functions

Callback implementation for FunLand.Combinable.empty/0.

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.

Callback implementation for FunLand.Reducible.reduce/3.

Converts the reducible into a list, by building up a list from all elements, and in the end reversing it.

Link to this section Functions

Link to this function

combine(mapset1, mapset2)

Callback implementation for FunLand.Combinable.empty/0.

Link to this function

reduce(a, combinable)

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 FunLand.Builtin.MapSet implements the FunLand.Reducible behaviour.

See FunLand.Reducible.reduce/2 for examples.

Link to this function

reduce(set, acc, fun)

Callback implementation for FunLand.Reducible.reduce/3.

Link to this function

to_list(reducible)

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 FunLand.Builtin.MapSet implements the FunLand.Reducible behaviour.