Created
November 22, 2019 09:39
-
-
Save tnull/7cded5f0ce8076900b9b1c92209b6bd2 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 OwnRecord = OwnRecord { key :: String | |
, testList :: [Float] | |
} | |
testMap :: String -> [Float] -> M.Map String OwnRecord | |
testMap s fs = foldl (\acc x -> M.insertWith update s x acc) M.empty fs | |
where | |
update (OwnRecord s newList) (OwnRecord s oldList) = OwnRecord s (oldList ++ newList) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment