since import { now } from 'fp-ts/lib/Date' ; import { HKT , Kind , Kind2 , Kind3 , URIS , URIS2 , URIS3 } from 'fp-ts/lib/HKT' ; import { MonadIO , MonadIO1 , MonadIO2 , MonadIO2C , MonadIO3 } from 'fp-ts/lib/MonadIO' ; example since export function time < M extends URIS3 > ( M ) ; export function time < M extends URIS2 > ( M ) ; export function time < M extends URIS2 , E > ( M ) ; export function time < M extends URIS > ( M ) ; export function time < M > ( M ) ; export function time < M > ( M ) { const nowM = M . fromIO ( now ) ; return ( ma ) => M . chain ( nowM , ( start ) => M . chain ( ma , ( a ) => M . map ( nowM , ( end ) => [ a , end - start ] ) ) ) ; }