export function or < T > ( list , match ) { return list . find ( ( a , i ) => match ( a , i ) ) != null ; } export function and < T > ( list , match ) { return list . find ( ( a , i ) => ! match ( a , i ) ) == null ; } export function zip < T , U > ( listA , listB ) { if ( listA . length !== listB . length ) return null ; return listA . map ( ( a , i ) => [ a , listB [ i ] ] as [ T , U ] ) ; } export function flat < T > ( list ) { return Array . prototype . concat . apply ( [ ] , list ) ; }