progs/re1.scala
changeset 647 180600c04da2
parent 631 f618dd4de24a
equal deleted inserted replaced
646:2abd285c66d1 647:180600c04da2
   137 size(ders(("ab" * 200).toList, BIG))    // 366808
   137 size(ders(("ab" * 200).toList, BIG))    // 366808
   138 
   138 
   139 for (i <- 0 to 200 by 10) {
   139 for (i <- 0 to 200 by 10) {
   140   println(f"$i: ${time_needed(2, matcher(BIG, "ab" * i))}%.5f")
   140   println(f"$i: ${time_needed(2, matcher(BIG, "ab" * i))}%.5f")
   141 }
   141 }
       
   142 
       
   143 
       
   144 
       
   145 
       
   146 //////////////////////////////////////
       
   147 def concat(A: Set[String], B: Set[String]) : Set[String] =
       
   148   for (s1 <- A; s2 <- B) yield s1 ++ s2
       
   149   
       
   150 
       
   151 val A = Set("foo", "bar")
       
   152 val B = Set("a", "b")
       
   153 
       
   154