progs/lecture1.scala
changeset 148 ead6089209ba
parent 147 72f7dd1a3754
child 170 37b1bfcdba79
--- a/progs/lecture1.scala	Fri Nov 17 02:13:40 2017 +0000
+++ b/progs/lecture1.scala	Fri Nov 17 09:13:03 2017 +0000
@@ -259,7 +259,9 @@
      m <- (1 to 3).toList;
      if (n + m) % 2 == 0) yield (n, m)
 
-
+for (n <- (1 to 3).toList; 
+     m <- (1 to 3).toList;
+     if ((n + m) % 2 == 0)) yield (n, m)
 
 // with patterns