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