I don\'t understand the role played by bottom (⊥
or _|_
) in Haskell function definitions.
The definition of zip for example describes it as \"r
Riffing on AJFarmar's answer, I think this critical point was not made explicit:
_|_
is not a valid literal or identifier in Haskell code!zip [] _|_ = []
isn't valid code either!That is implicit in what AJFarmar means by this quote:
[T]he line
zip [] _|_ = []
does not act as a pattern match but an equation, stating the equality ofzip [] _|_
and[]
.
To make it very crystal clear, zip [] _|_ = []
appears in the documentation comment for the definition of zip
. It's not Haskell code—it's an English-language comment written in an informal technical notation that looks a little bit like Haskell code. Or, in other words, pseudo-code.