[Haskell-beginners] Explanation of elem data type

Galaxy Being borgauf at gmail.com
Tue Aug 3 22:14:38 UTC 2021


According to this <http://zvon.org/other/haskell/Outputprelude/elem_f.html>
elem is

Eq a => a -> [a] -> Bool

but according to my ghci :t it's this

elem :: (Foldable t, Eq a) => a -> t a -> Bool

I understand the first, but not the second, especially with the t. What is
this saying extra, different from the first one?


⨽
Lawrence Bottorff
Grand Marais, MN, USA
borgauf at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20210803/cd35cd34/attachment.html>


More information about the Beginners mailing list