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