import { throwNIE } from '../../../throw' ; type Nothing = Readonly < { tag : 'Nothing' ; } > ; type Just < A > = Readonly < { tag : 'Just' ; value : A ; } > ; export type Maybe < A > = Nothing | Just < A > ; export const nothing = { tag : 'Nothing' } ; export const just = < A > ( value ) : Maybe < A > => ( { tag : 'Just' , value } ) ; export const fmap = < A , B > ( _f ) => ( _ma ) : Maybe < B > => throwNIE ( ) ; export const maybe = { map : fmap , } ;