--- a/progs/app5.scala Sun Aug 21 18:15:53 2016 +0200
+++ b/progs/app5.scala Mon Aug 22 09:12:03 2016 +0200
@@ -1,4 +1,4 @@
-def nullable (r: Rexp) : Boolean = r match {
+def nullable(r: Rexp) : Boolean = r match {
case ZERO => false
case ONE => true
case CHAR(_) => false
@@ -7,7 +7,7 @@
case STAR(_) => true
}
-def der (c: Char, r: Rexp) : Rexp = r match {
+def der(c: Char, r: Rexp) : Rexp = r match {
case ZERO => ZERO
case ONE => ZERO
case CHAR(d) => if (c == d) ONE else ZERO
@@ -18,7 +18,7 @@
case STAR(r) => SEQ(der(c, r), STAR(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, der(c, r))
}