
11 Sep
2012
11 Sep
'12
12:59 p.m.
Hello, I'm reading learnyouahaskell.com. There is an example: [1] ghci> Map.fromList [("betty","555-2938"),("bonnie","452-2928"),("lucille","205-2928")] fromList [("betty","555-2938"),("bonnie","452-2928"),("lucille","205-2928")] Why does Map.fromList represent its output like this? Could you explain me the following definition? data Map.Map k a = Data.Map.Tip | Data.Map.Bin !Data.Map.Size !k a !(Map.Map k a) !(Map.Map k a) I guess that this fromList example is a bit premature. The only parameterised type I know is this one: data Maybe a = Nothing | Just a [1] http://learnyouahaskell.com/modules#data-map Thanks