🐐 MVTA, CRIBRA, CONFLA
This commit is contained in:
30
README.md
30
README.md
@@ -370,6 +370,36 @@ With a comparator, the type-uniformity rule is dropped — the comparator decide
|
||||
> [V III II I]
|
||||
```
|
||||
|
||||
### MVTA
|
||||
`MVTA(array, fn)`
|
||||
|
||||
Returns a new array obtained by applying `fn` to every element of `array`. The original array is unchanged. `fn` must be a function of exactly one parameter; its return value is unrestricted, so `MVTA` may produce an array of a different element type than its input.
|
||||
|
||||

|
||||
```
|
||||
> [II IV VI VIII]
|
||||
```
|
||||
|
||||
### CRIBRA
|
||||
`CRIBRA(array, predicate)`
|
||||
|
||||
Returns a new array containing the elements of `array` for which `predicate` returns `VERITAS`, in their original order. The original array is unchanged. `predicate` must be a function of exactly one parameter and must return `VERAX`.
|
||||
|
||||

|
||||
```
|
||||
> [I II III]
|
||||
```
|
||||
|
||||
### CONFLA
|
||||
`CONFLA(array, initial, fn)`
|
||||
|
||||
Left fold: starts with `initial` as the accumulator, then for each element `e` of `array` updates the accumulator to `fn(acc, e)`, and returns the final accumulator. The original array is unchanged. `fn` must be a function of exactly two parameters. If `array` is empty, `initial` is returned unchanged.
|
||||
|
||||

|
||||
```
|
||||
> XVI
|
||||
```
|
||||
|
||||
### ADDE
|
||||
`ADDE(array, value)`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user