Last active
May 20, 2018 16:55
-
-
Save russmatney/b96d0189be674ba7a8c06b4503f51979 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
hasn'tExample :: IO () | |
hasn'tExample = do | |
let bob = User (UserName "bob") 42 Nothing HM.empty | |
print "Hasn't bob gold in his inventory?" | |
print $ hasn't (inventory . ix "gold") bob | |
-- True | |
-- As in, "Yes, he doesn't." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment