import { List } from '../types' ; import { arrayFrom } from '../arrayFrom' ; import { curry2 } from '@typed/functions' ; import { filter } from '../filter' ; name export const without = curry2 ( __without ) ; export type Without = { < A > ( values , list ) : Array < A > ; < A > ( values ) : ( list : List < A > ) => Array < A > ; } ; function __without < A > ( values , list ) { const set = new Set ( arrayFrom ( values ) ) ; return filter ( x => ! set . has ( x ) , list ) ; }