Name: Anonymous 2010-03-28 10:15
Show how the single comprehension [(x , y) | x ← [1, 2, 3], y ←
[4, 5, 6]] with two generators can be re-expressed using two comprehensions
with single generators. Hint: make use of the library function concat
and nest one comprehension within the other.
It's been easy up until now, but I can't figure out how to nest one comprehension within the other. Any ideas besides reading SICP?
[4, 5, 6]] with two generators can be re-expressed using two comprehensions
with single generators. Hint: make use of the library function concat
and nest one comprehension within the other.
It's been easy up until now, but I can't figure out how to nest one comprehension within the other. Any ideas besides reading SICP?