Answers for "scala list get element"

0

scala list get element

scala> val l = List("a", "b", "c")
scala> l.lift(1)
Some("b")
scala> l.lift(5)
None
Posted by: Guest on March-28-2022

Code answers related to "Scala"

Browse Popular Code Answers by Language