--- a/progs/re1.scala Sat Oct 29 21:47:22 2016 +0100
+++ b/progs/re1.scala Mon Nov 14 15:50:42 2016 +0000
@@ -1,3 +1,4 @@
+
abstract class Rexp
case object ZERO extends Rexp
case object ONE extends Rexp
@@ -62,9 +63,9 @@
val EVIL2 = SEQ(STAR(STAR(CHAR('a'))), CHAR('b'))
//for measuring time
-def time_needed[T](i: Int, code => T) = {
+def time_needed[T](i: Int, code: => T) = {
val start = System.nanoTime()
- for (j <- 1 to i) code()
+ for (j <- 1 to i) code
val end = System.nanoTime()
(end - start)/(i * 1.0e9)
}