changeset 564 | b5d57d7064bb |
parent 525 | a2ee4b11c976 |
child 572 | 4a1739f256fd |
--- a/progs/pow.scala Fri Sep 28 13:54:18 2018 +0100 +++ b/progs/pow.scala Sun Sep 30 12:01:14 2018 +0100 @@ -1,5 +1,5 @@ def concat(A: Set[String], B: Set[String]) : Set[String] = - for (x <-A ; y <- B) yield x ++ y + for (x <- A ; y <- B) yield x ++ y def pow(A: Set[String], n: Int) : Set[String] = n match { case 0 => Set("") @@ -33,3 +33,7 @@ val A = Set("a", "b", "") pow(A, 5).size + + +for (n <- (0 to 12).toList) + yield pow(A, n).size \ No newline at end of file