On October 9 (13:22 +0400), S.D.Mechveliani wrote with possible deletions:
| I wrote f n = [(x,y,z,u) | xs = [0..n], x <- xs,
| ys = xs\\[x], y <- ys,
| zs = ys\\[y], z <- zs, u <- zs\\[z]
| ],
|
| and Gofer allowed this. But Haskell-98 does not.
| So, i write here
| ... xs <- [[0..n]], x <- xs,
| ys <- [xs\\[x]], y <- ys ...
Comprehension come with `let'-syntax which might be of help here:
[ ... | ..., let xs = [0..n], x <- xs,
let ys = xs \\ [x], y <- ys, ... ]
Best wishes,
--Torsten
--
| Torsten Grust [EMAIL PROTECTED] |
| http://www.fmi.uni-konstanz.de/~grust/ |
| Database Research Group, University of Konstanz (Lake Constance/Germany) |