0
$\begingroup$

In Meijer, Fokkinga and Patersons "Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire" the ∇ operator for sum types is introduced which removes the tags from its argument:

∇ _|_ = _|_

∇ (i, x) = x

What is the type of this operator? Something like

A|B -> A U B

?

As the article is recommended on the Haskell wiki, how could this operator be implemented in haskell?

$\endgroup$
2
  • $\begingroup$ should be something similar to the :+: $\endgroup$
    – Apoorv
    Commented Feb 17, 2023 at 15:29
  • $\begingroup$ @Apoorv but :+: acts on types $\endgroup$
    – pgmcr
    Commented Feb 19, 2023 at 17:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.