(self: Iterable<A>)
| 756 | * @since 2.0.0 |
| 757 | */ |
| 758 | export const init = <A>(self: Iterable<A>): Option.Option<Array<A>> => { |
| 759 | const input = fromIterable(self) |
| 760 | return isNonEmptyReadonlyArray(input) ? Option.some(initNonEmpty(input)) : Option.none() |
| 761 | } |
| 762 | |
| 763 | /** |
| 764 | * Get all but the last element of a non empty array, creating a new array. |
nothing calls this directly
no test coverage detected