Created
May 7, 2020 19:30
-
-
Save prathyvsh/ba553373c35853729db9890d15e1f812 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
Iterable<Map<String,int>>parseCSV(String csv) { | |
return csv.split("\n").map((String s) { | |
List<String> kv = s.split(","); | |
String k = kv[0]; | |
num v = int.parse(kv[1]); | |
return {k: v}; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment