KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is there any difference between this code: for(term <- term_array) { val list = hashmap.get(term) ... } and: for(term <- term_array; val list = hashmap.get(term)) { ... } Inside the loop I'm changing the hashmap with something like this hashmap.put(term, string :: list) While checking for the head of list it seems to be outdated somehow when using the second code snippet.
Tags (comma-separated)
Save Edits
Cancel