I want to define a function that has the following properties
symmetricLazyOr :: Bool -> Bool -> Bool symmetricLazyOr True _|_ === True symmetricLazyOr _|_ True === True
Otherwise, it works like a regular or .
Is this possible in Haskell?
UPDATE
This question focuses on semantic rather than detailing implementation. Intuitively, or must be symmetric, which means or ab === or ba for all given a and b . However, this is not true in Haskell, since or _|_ True === _|_ while or True _|_ === True .
haskell
Earth engine
source share