type Name = String type Table = [ (Name, Name) ] fathers :: Table fathers = [ ("a", "d"), ("b", "r") ] head' :: [a] -> a head' (x:xs) = x helper :: Integer -> [a] -> Integer helper acc (x:xs) = helper (acc + 1) xs helper acc ([]) = acc len' :: [a] -> Integer len' xs = helper 0 xs inv :: [a] -> [a] inv _ = _ getF :: Name -> Maybe Name getF n = lookup n fathers