invertFunction' :: (Enum a, Eq b) => (a -> Maybe b) -> (b -> Maybe a)
invertFunction' f x = lookup x [ (r, e) | e <- enumAll, Just r <- [f e] ]
invertFunction' :: (Enum a, Eq b) => (a -> Maybe b) -> (b -> Maybe a)
invertFunction' f x = lookup x [ (r, e) | e <- enumAll, Just r <- [f e] ]
invertFunction' f x = lookup x [ (r, e) | e <- enumAll, Just r <- [f e] ]