Skip to content
Snippets Groups Projects
Commit 549ec0e3 authored by Etienne Kneuss's avatar Etienne Kneuss
Browse files

List.apply should be Scala-executable. Fix leon.math not being @library

parent 7dd92914
No related branches found
No related tags found
No related merge requests found
......@@ -451,7 +451,13 @@ sealed abstract class List[T] {
@ignore
object List {
def apply[T](elems: T*): List[T] = ???
def apply[T](elems: T*): List[T] = {
var l: List[T] = Nil[T]()
for (e <- elems) {
l = Cons(e, l)
}
l.reverse
}
}
@library
......
package leon
import leon.annotation._
package object math {
@library
def min(i1: Int, i2: Int) = if (i1 <= i2) i1 else i2
@library
def max(i1: Int, i2: Int) = if (i1 >= i2) i1 else i2
@library
def min(i1: BigInt, i2: BigInt) = if (i1 <= i2) i1 else i2
@library
def max(i1: BigInt, i2: BigInt) = if (i1 >= i2) i1 else i2
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment