import { Predicate } from 'fp-ts/lib/function' ; import { pipe } from 'fp-ts/lib/pipeable' ; import { monoidAllFoldMap } from './shared/monoidAllFoldMap' ; function _allPass < T > ( predicates , val ) { return pipe ( predicates , monoidAllFoldMap ( predicate => predicate ( val ) ) ) ; } since export function allPass < T > ( predicates ) ; export function allPass < T > ( predicates , val ) ; export function allPass < T > ( predicates , val ? ) { if ( val === undefined ) { return val => _allPass ( predicates , val ) ; } else { return _allPass ( predicates , val ) ; } }