GHC.Exts
exports the function the
:
the
ensures that all the elements of the list are identical and then returns that unique element
This function is partial as it throws an error in case not all elements of the list are equal.
How can I implement a function theMay
that returns a Maybe
instead?