diff -r e28d7a327870 -r 4fee50f38305 progs/re0.scala --- a/progs/re0.scala Sun May 07 03:01:29 2017 +0100 +++ b/progs/re0.scala Tue May 09 12:31:55 2017 +0100 @@ -1,4 +1,5 @@ import scala.annotation.tailrec +import scala.language.implicitConversions abstract class Rexp @@ -72,6 +73,7 @@ if (i == 0) NULL else SEQ(der(c, r), REP(r, i - 1)) } + // derivative w.r.t. a string (iterates der) @tailrec def ders (s: List[Char], r: Rexp) : Rexp = s match {