2 ms·
contains :: (NameClass, QName) -> Bool is valid Haskel, and denotes that "contains" is a function that takes a tuple and returns a bool. As a matter of style,
by gizmo686 11y ago
contains :: (NameClass, QName) -> Bool
is valid Haskel, and denotes that "contains" is a function that takes a tuple and returns a bool. As a matter of style, Haskellers tend to avoid writing function like this, and prefer to write functions like
contains :: NameClass -> (QName -> Bool)
which indicates that "contains" is a function that takes a "NameClass" and returns another function. Because this pattern is so common in Haskell, -> is defined to be right-associative, so the paranthese can be omited.