progs/re3.scala
changeset 453 36e5752fa191
parent 441 028816884f70
child 454 edb4ad356c56
--- a/progs/re3.scala	Mon Oct 17 13:18:34 2016 +0100
+++ b/progs/re3.scala	Tue Oct 18 10:43:26 2016 +0100
@@ -31,7 +31,7 @@
     else SEQ(der(c, r1), r2)
   case STAR(r1) => SEQ(der(c, r1), STAR(r1))
   case NTIMES(r, i) => 
-    if (i == 0) ZERO else SEQ(der(c, r), NTIMES(r, i - 1))
+    if (i == 0) ZERO else der(c, SEQ(r, NTIMES(r, i - 1)))
 }
 
 def simp(r: Rexp) : Rexp = r match {