import { List } from '../types' ; import { curry2 } from '@typed/functions' ; import { drop } from '../drop' ; name export const takeLast = curry2 ( < A > ( n , list ) => drop ( n >= 0 ? list . length - n : 0 , list ) ) ; export type TakeLast = { < A > ( n , list ) : Array < A > ; < A > ( n ) : ( list : List < A > ) => Array < A > ; } ;