Skip to content
Snippets Groups Projects
Commit c502d1b4 authored by Philippe Suter's avatar Philippe Suter
Browse files

benchmark works with findAll but crashed weirdly with lazyFindAll

parent f9167743
No related branches found
No related tags found
No related merge requests found
import cp.Definitions._
import cp.Terms._
object BinarySortedLists {
def main(args : Array[String]) : Unit = {
val inRange : Constraint1[Int] = ((x : Int) => x >= 0 && x <= 1)
val sortedLists =
for(x <- inRange.lazyFindAll;
y <- inRange.lazyFindAll if y >= x;
z <- inRange.lazyFindAll if z >= y)
yield {
x.value; y.value; z.value;
List(x, y, z)
}
sortedLists.foreach(println(_))
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment