Created
February 21, 2019 21:58
-
-
Save kubaracek/04be3cda43c7db900cbc09718d1c0b39 to your computer and use it in GitHub Desktop.
This file contains 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
useWord :: Game.Word -> AvailableChars -> Maybe AvailableChars | |
useWord [] [] = Just [] | |
useWord (a) [] = Nothing | |
useWord [] (a) = Just a | |
useWord (x:xs) (y) | |
| elem x y = useWord xs $ deleteFirst x y | |
| otherwise = Nothing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment