alvinalexander.com
6 months agoScala
How to add elements to a List in Scala (List, ListBuffer)
Scala Lists are immutable data structures, elements can't be added directly.
Prepending elements to a Scala List is a common way to add elements. [ more ]