@unction/applicators
v13.16.0
Published
Takes a list of functions and a list of values and applies the values to the functions
Downloads
110
Readme
@unction/applicators
Array<MapperFunctionType<A, B>> | Set<MapperFunctionType<A, B>> | RecordType<C, MapperFunctionType<A, B>> => Record<string | number | symbol, A> | Map<C, A> => Record<string | number | symbol, B> | Map<C, B>
Takes a list of functions and a list of values and applies the values to the functions.
applicators([
recordfrom(["point", "x"]),
recordfrom(["point", "y"]),
recordfrom(["point", "z"]),
])([
40.453,
2.2,
423.0,
])
returns
[
{point: {x: 40.453}},
{point: {y: 2.2}},
{point: {z: 423.0}},
]
applicators({
x: inc,
y: dec
})({
x: -1,
y: 1
})
returns
{
x: 0,
y: 0
}