The List data type and its operations
\begin{code}
+{-# OPTIONS -fno-implicit-prelude #-}
+
module PrelList (
[] (..),
zip, zip3, zipWith, zipWith3, unzip, unzip3
) where
-import Prelude ()
-import IOBase ( error ) {-# SOURCE #-}
+import {#- SOURCE #-} IOBase ( error )
import PrelTup
import PrelBase
-- e.g., x `elem` xs. notElem is the negation.
elem, notElem :: (Eq a) => a -> [a] -> Bool
elem x = any (== x)
-notElem x = all (not . (/= x))
+notElem x = all (/= x)
-- lookup key assocs looks up a key in an association list.
lookup :: (Eq a) => a -> [(a,b)] -> Maybe b