Skip to content
Snippets Groups Projects
Commit c8c767a7 authored by Régis Blanc's avatar Régis Blanc
Browse files

List testcase

parent 61553644
Branches
Tags
No related merge requests found
import leon.Utils._
object List {
abstract class List
case class Cons(head: Int, tail: List) extends List
case class Nil() extends List
def size(l: List): Int = waypoint(1, (l match {
case Cons(_, tail) => 1 + size(tail)
case Nil() => 0
})) ensuring(_ >= 0)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment