progs/app6.scala
changeset 412 1cef3924f7a2
parent 399 5c1fbb39c93e
child 422 5deefcc8cffa
--- a/progs/app6.scala	Sun Aug 21 18:15:53 2016 +0200
+++ b/progs/app6.scala	Mon Aug 22 09:12:03 2016 +0200
@@ -3,7 +3,8 @@
     (simp(r1), simp(r2)) match {
       case (ZERO, r2s) => r2s
       case (r1s, ZERO) => r1s
-      case (r1s, r2s) => if (r1s == r2s) r1s else ALT(r1s, r2s)
+      case (r1s, r2s) => 
+        if (r1s == r2s) r1s else ALT(r1s, r2s)
     }
   }
   case SEQ(r1, r2) => {
@@ -19,7 +20,7 @@
   case r => r
 }
 
-def ders (s: List[Char], r: Rexp) : Rexp = s match {
+def ders(s: List[Char], r: Rexp) : Rexp = s match {
   case Nil => r
   case c::s => ders(s, simp(der(c, r))) (*@\label{simpline}@*) 
 }