f :: (,) a [b] -> a -- constructor de tip f x = fst x g :: [] Integer -> Integer -- constructor de tip g l = 1 + head l d = [(1, 'a'), (2, 'b'), (3, 'c'), (2, 'd')] search k dict = case res of [] -> Nothing v:_ -> Just v where res = [val | (key, val) <- dict, key == k] fromMaybe Nothing = undefined fromMaybe (Just x) = x s :: String s = "abc" --a :: [] --a = [] t :: (,,,) Integer Char [Char] Bool t = (1, 'a', "abc", True) -- fx x = (x x)