Last active
January 16, 2019 18:12
-
-
Save vtatai/988d707b85c515ed2f6e9ab15eba2c76 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
data User = User { | |
name :: String, | |
child :: Maybe User | |
} deriving Show | |
john = User {name="John", child=Just User{name="Christie", child=Nothing}} | |
complexUsers = Map.fromList[(1, john)] | |
lookupComplexUser id = Map.lookup id complexUsers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment