Skip to content

Instantly share code, notes, and snippets.

View oktay-sen's full-sized avatar

Oktay Sen oktay-sen

View GitHub Profile
lookUp :: Char -> [(Char, Char)] -> Char
lookUp needle xs = if (null selected) then needle else snd $ selected !! 0
where
selected = [x | x <- xs, fst x == needle]