You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scala> List().head
java.util.NoSuchElementException: head of empty list
at scala.collection.immutable.Nil$.head(List.scala:663)
at scala.collection.immutable.Nil$.head(List.scala:662)
... 30 elided
scala> List().headOption
val res1: Option[Nothing] = None
scala> NonEmptyList(1).head
1
The text was updated successfully, but these errors were encountered:
motivation:
it'd be nice to centralize nonempty collections into de-facto stdlib.
example usage:
The text was updated successfully, but these errors were encountered: