1 def ders(s: List[Char], r: Rexp) : Rexp = s match {
2 case Nil => r
3 case c::s => ders(s, simp(der(c, r)))
4 }