import { Future } from './Future' ; import { curry2 } from '@typed/functions' ; name export const chainLeft = curry2 ( __chainLeft ) ; function __chainLeft < A , B , C > ( f , future ) { return Future . create ( ( reject , resolve ) => future . fork ( value => f ( value ) . fork ( reject , resolve ) , resolve ) ) ; } export type FutureChainLeft = { < A , B , C > ( f , future ) : Future < C , B > ; < A , B , C > ( f ) : ( future : Future < A , B > ) => Future < C , B > ; } ;