Skip to content

Instantly share code, notes, and snippets.


qaisjp/tut2 ex4.hs

Forked from Fasand/tut2 ex4
Last active Oct 9, 2016
What would you like to do?
lookUp :: Char -> [(Char, Char)] -> Char
lookUp needle xs = if (null selected) then needle else snd $ selected !! 0
selected = [x | x <- xs, fst x == needle]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment