import { Arity1 } from '@typed/functions' ; import { Either } from '../Either' ; export type Unpack = { < A , B , C > ( f , g , either ) : C ; < A , B , C > ( f , g ) : ( either : Either < A , B > ) => C ; < A , B , C > ( f ) : UnpackArity2A < A , B , C > ; < A , C > ( f ) : UnpackArity2B < A , C > ; } ; export type UnpackArity2A < A , B , C > = { ( g , either ) : C ; ( g ) : ( either : Either < A , B > ) => C ; } ; export type UnpackArity2B < A , C > = { < B > ( g , either ) : C ; < B > ( g ) : ( either : Either < A , B > ) => C ; } ;