import { Maybe , fromMaybe } from '@typed/maybe' ; import { List } from '../types' ; import { arrayFrom } from '../arrayFrom' ; import { curry3 } from '@typed/functions' ; name export const slice = curry3 ( __slice ) ; export type Slice = { < A > ( startIndex , endIndex , list ) : Array < A > ; < A > ( startIndex , endIndex ) : ( list : List < A > ) => Array < A > ; < A > ( startIndex ) : { ( endIndex , list ) : Array < A > ; ( endIndex ) : ( list : List < A > ) => Array < A > ; } ; } ; function __slice < A > ( startIndex , endIndex , list ) { return arrayFrom ( list ) . slice ( startIndex , fromMaybe ( void 0 , endIndex ) ) ; }