Created
July 18, 2015 13:54
-
-
Save cosmo0920/fde0ff9b30eaa008a51b 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
GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help | |
Loading package ghc-prim ... linking ... done. | |
Loading package integer-gmp ... linking ... done. | |
Loading package base ... linking ... done. | |
Prelude> import Data.Map | |
Prelude Data.Map> let t = insert 5 "e" $ singleton 4 "d" | |
Loading package array-0.4.0.1 ... linking ... done. | |
Loading package deepseq-1.3.0.1 ... linking ... done. | |
Loading package containers-0.5.0.0 ... linking ... done. | |
Prelude Data.Map> t | |
fromList [(4,"d"),(5,"e")] | |
Prelude Data.Map> insert 3 "c" $ t | |
fromList [(3,"c"),(4,"d"),(5,"e")] | |
Prelude Data.Map> t | |
fromList [(4,"d"),(5,"e")] | |
Prelude Data.Map> delete 4 t | |
fromList [(5,"e")] | |
Prelude Data.Map> t | |
fromList [(4,"d"),(5,"e")] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment