Returns an array that is the result of applying a transformation function (lambda) to each of the elements.
The lambda is invoked with two parameters: index and the value. If these parameters are not named, the index is defined by default as $$ and the value as $.
Use map on an Object
(':object', ':function') ⇒ ':array'
Returns an array with the values that result out of applying a transformation function (lambda) to each of the values in the object.
The keys of the original object are all ignored by this operation and the object is treated as an array.
Similar to map, but instead of processing only the values of an object, it processes both keys and values as a tuple.
Also instead of returning an array with the results of processing these values through the lambda, it returns an object, which consists of a list of the key:value pairs that result from processing both key and value of the object through the lambda.
pluck is useful for mapping an object into an array.
pluck is an alternate mapping mechanism to mapObject.
Like mapObject, pluck executes a lambda over every key:value pair in its processed object as a tuple, but instead of returning an object, it returns an array, which may be built from either the values or the keys in the object.
Returns an array that is the result of applying a transformation function (lambda) to each of the elements.
The lambda is invoked with two parameters: index and the value. If these parameters are not named, the index is defined by default as $$ and the value as $.
Use filter on an Object
(':object', ':function') ⇒ ':object'
Returns an object with the key:value pairs that pass the acceptance criteria defined in the lambda.
If these parameters are not named, the index is defined by default as $$ and the value as $.
Extracts a set of characters out of a string, based on the position that the first and last character of the desired substring occupy in the character array.
If we use negative numbers, you can also inverse the order in which characters are set.
Comments