(i: number, as: ReadonlyArray<A>)
| 914 | |
| 915 | const clamp = <A>(i: number, as: ReadonlyArray<A>): number => Math.floor(Math.min(Math.max(0, i), as.length)) |
| 916 | |
| 917 | /** |
| 918 | * Reads an element at the given index safely, returning `Option.some` or |
| 919 | * `Option.none` if the index is out of bounds. |
| 920 | * |
| 921 | * **When to use** |
no outgoing calls
no test coverage detected
searching dependent graphs…