hashmap - Nested Map in Haskell -
what trying when have rec1 = [("name", "obj-1"), ("status", "up"), ("region", "us")] then have [( "us", [("up", [("name", "obj-1"), ("status", "up"), ("region", "us")])])] this code have come in haskell. rec1 = [("name", "obj-1"), ("status", "up"), ("region", "us")] convertto rec = prelude.foldl (\map (k, v) -> data.map.insert k v map) data.map.empty rec justfold = prelude.foldr (\key val -> data.map.insert key val data.map.empty) (convertto rec1) ["us","up"] in third line above, in lambda function definition, compiler not agreeing type of val. saying expects char , getting string or not able match map string list type. i not haskell, looking if give me pointers it. thanks. edit: corrected output type. mistyped @ first. there few...