currently have function:
removenull strlist = filter (not . null) strlist
but need use map (i assume) apply list of lists, i'm getting type errors.
in ghci, functions filters correctly:
removenull ["i", "", "b"] ["i","b"]
but doesn't filter:
removenull [["i", "", "b"], ["i", "", "b"]] [["i","","b"],["i","","b"]]
simply use map
apply filter each sublist, e.g.
removenull strlist = map (filter (not . null)) strlist //^^^ see here
Comments
Post a Comment