progs/re1.scala
changeset 647 180600c04da2
parent 631 f618dd4de24a
--- a/progs/re1.scala	Thu Oct 03 11:12:00 2019 +0100
+++ b/progs/re1.scala	Fri Oct 04 11:21:30 2019 +0100
@@ -139,3 +139,16 @@
 for (i <- 0 to 200 by 10) {
   println(f"$i: ${time_needed(2, matcher(BIG, "ab" * i))}%.5f")
 }
+
+
+
+
+//////////////////////////////////////
+def concat(A: Set[String], B: Set[String]) : Set[String] =
+  for (s1 <- A; s2 <- B) yield s1 ++ s2
+  
+
+val A = Set("foo", "bar")
+val B = Set("a", "b")
+
+