UNPKG

fp-ts-std

Version:

The missing pseudo-standard library for fp-ts.

8 lines (7 loc) 231 B
import { flow, pipe } from "fp-ts/function"; export const URI = "Show"; export const contramap = (f) => (m) => ({ show: flow(f, m.show) }); export const Contravariant = { URI, contramap: (m, f) => pipe(m, contramap(f)), };