new IndexedLens(index, unsafe) → {Lens}
An IndexedLens is a Lens that focuses on some index of an array.
Parameters:
| Name | Type | Description |
|---|---|---|
index |
int | The index to view on |
unsafe |
boolean | If true, throws errors when index is out of range. |
Returns:
- Type
- Lens
Classes
Methods
-
<static> deriveLenses(arr) → {Array}
-
Derive all indexed lenses for an array and return them in an array
Parameters:
Name Type Description arrArray The array to derive Lenses from
Returns:
An array of Lenses focusing on each index of arr
- Type
- Array