-
-
Save oktay-sen/5452d21184a862ad96df2c912e031dd3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment