Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
lookUp :: Char -> [(Char, Char)] -> Char
lookUp c [] = c
lookUp c charset = if not (null y) then head y else c
where y = [b | (a,b) <- charset, a == c]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment