Skip to content

Instantly share code, notes, and snippets.

@tonymorris
Created April 17, 2019 05:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tonymorris/2d1030235c0c447d2ec515d752169195 to your computer and use it in GitHub Desktop.
Save tonymorris/2d1030235c0c447d2ec515d752169195 to your computer and use it in GitHub Desktop.
cancelUnit ::
Iso (a, ()) (b, ()) a b
cancelUnit =
iso
(\(a, ()) -> a)
(\b -> (b, ()))
cancelVoid ::
Iso (Either a Void) (Either b Void) a b
cancelVoid =
dimap (either id absurd) (fmap Left)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment