import { List } from '../types' ; import { curry2 } from '@typed/functions' ; import { fromMaybe } from '@typed/maybe' ; import { indexOf } from '../indexOf' ; import { map } from '@typed/maybe' ; name export const contains = curry2 ( __contains ) ; export type Contains = { < A > ( value , list ) : boolean ; < A > ( value ) : ( list : List < A > ) => boolean ; } ; function __contains < A > ( value , list ) { return fromMaybe ( false , map ( ( ) => true , indexOf ( value , list ) ) ) ; }