(self: Iterable<A>)
| 1300 | * @since 2.0.0 |
| 1301 | */ |
| 1302 | export function init<A>(self: Iterable<A>): Option.Option<Array<A>> { |
| 1303 | const as = fromIterable(self) |
| 1304 | return isReadonlyArrayNonEmpty(as) ? Option.some(initNonEmpty(as)) : Option.none() |
| 1305 | } |
| 1306 | |
| 1307 | /** |
| 1308 | * Returns all elements except the last of a `NonEmptyReadonlyArray`. |
nothing calls this directly
no test coverage detected