import { array } from 'fp-ts/lib/Array' ; function _xprod < A , B > ( as , bs ) { return array . chain ( as , a => bs . map ( b => [ a , b ] ) ) ; } since export function xprod < A > ( as ) ; export function xprod < A , B > ( as , bs ) ; export function xprod < A , B > ( as , bs ? ) { if ( bs === undefined ) { return ( bs ) => _xprod ( as , bs ) ; } else { return _xprod ( as , bs ) ; } }