'Haskell elem function definition has t a can you explain that
I was looking at the type annotation of function elem. It looked like this:
elem :: Eq a => a -> t a -> Bool
I understand that Eq a => is a type constraint.
So a must support ==.
But I don't understand t a, where does this t came from ?
What does it do? Why is it necessary?
Link: https://hackage.haskell.org/package/base-4.16.0.0/docs/Prelude.html#v:elem
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
