Last active
August 29, 2015 14:16
-
-
Save wrobstory/4f1e7896f2ed1c36d260 to your computer and use it in GitHub Desktop.
Scala +: :+
This file contains hidden or 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
scala> val fooList: List[String] = List() | |
fooList: List[String] = List() | |
scala> foo :+ "one" | |
res117: List[String] = List(one) | |
scala> foo +: "one" | |
res118: scala.collection.immutable.IndexedSeq[Any] = Vector(List(), o, n, e) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment