import { Future } from './Future' ; import { chain } from './chain' ; import { curry2 } from '@typed/functions' ; name export const map = curry2 ( __map ) ; function __map < A , B , C > ( f , future ) { return chain ( b => Future . of ( f ( b ) ) , future ) ; } export type FutureMap = { < A , B , C > ( f , future ) : Future < A , C > ; < A , B , C > ( f ) : ( future : Future < A , B > ) => Future < A , C > ; } ;