since import { array } from 'fp-ts/lib/Array' ; import { HKT , Kind , Kind2 , Kind3 , URIS , URIS2 , URIS3 } from 'fp-ts/lib/HKT' ; import { Monad , Monad1 , Monad2 , Monad2C , Monad3 } from 'fp-ts/lib/Monad' ; example since export function batchTraverse < M extends URIS3 > ( M ) ; export function batchTraverse < M extends URIS2 > ( M ) ; export function batchTraverse < M extends URIS2 , L > ( M ) ; export function batchTraverse < M extends URIS > ( M ) ; export function batchTraverse < M > ( M ) ; export function batchTraverse < M > ( M ) { const traverseM = array . traverse ( M ) ; return < A , B > ( as , f ) => as . reduce ( ( mbs , chunk ) => M . chain ( mbs , ( bs ) => M . map ( traverseM ( chunk , f ) , ( chunk ) => { bs . push ( ... chunk ) ; return bs ; } ) ) , M . of ( [ ] ) ) ; }