SyntaxFix
Write A Post
Hire A Developer
Questions
use map() on collection followed with toMap
val map = list.map(e => (e, e.length)).toMap