Class: DefMap

algeobra~DefMap(f)

Maps an array of values to an output using a function. A special case of the general function type.

Constructor

new DefMap(f)

Parameters:
Name Type Description
f function | Object The function to be applied If the object is a function, it is directly applied, otherwise the compute field is used as is used in other definitions
Source:

Methods

(static) fromArray(array) → {CreateInfo}

Map an array of values
Parameters:
Name Type Description
array Number | Object Either the index or value of objects
Source:
Returns:
The creation info
Type
CreateInfo

(static) fromValues(…array) → {CreateInfo}

Map an array of values
Parameters:
Name Type Attributes Description
array Number | Object <repeatable>
Either the indices or values of objects
Source:
Returns:
The creation info
Type
CreateInfo