Skip to content

Instantly share code, notes, and snippets.

@russmatney
Last active May 20, 2018 16:55
Show Gist options
  • Save russmatney/b96d0189be674ba7a8c06b4503f51979 to your computer and use it in GitHub Desktop.
Save russmatney/b96d0189be674ba7a8c06b4503f51979 to your computer and use it in GitHub Desktop.
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