progs/re1.scala
changeset 586 451a95e1bc25
parent 563 bddf14e026b3
child 623 47a299e7010f
--- a/progs/re1.scala	Wed Oct 24 13:07:13 2018 +0100
+++ b/progs/re1.scala	Wed Oct 24 16:03:07 2018 +0100
@@ -10,7 +10,7 @@
 
 // nullable function: tests whether a regular 
 // expression can recognise the empty string
-def nullable (r: Rexp) : Boolean = r match {
+def nullable(r: Rexp) : Boolean = r match {
   case ZERO => false
   case ONE => true
   case CHAR(_) => false
@@ -40,7 +40,8 @@
 }
 
 // main matcher function
-def matches(r: Rexp, s: String) : Boolean = nullable(ders(s.toList, r))
+def matches(r: Rexp, s: String) : Boolean = 
+  nullable(ders(s.toList, r))
 
 
 //examples from the homework