Skip to content
Snippets Groups Projects
Commit a4f73533 authored by Emmanouil (Manos) Koukoutos's avatar Emmanouil (Manos) Koukoutos
Browse files

List.isEmpty in Leon lib

parent 14cf3f71
No related branches found
No related tags found
No related merge requests found
...@@ -32,6 +32,7 @@ sealed abstract class Option[T] { ...@@ -32,6 +32,7 @@ sealed abstract class Option[T] {
def nonEmpty = !isEmpty def nonEmpty = !isEmpty
def isDefined = !isEmpty def isDefined = !isEmpty
} }
case class Some[T](v: T) extends Option[T] case class Some[T](v: T) extends Option[T]
......
...@@ -285,6 +285,11 @@ sealed abstract class List[T] { ...@@ -285,6 +285,11 @@ sealed abstract class List[T] {
} }
} }
def isEmpty = this match {
case Nil() => true
case _ => false
}
} }
@ignore @ignore
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment