in a declarative language, length(a) == 0 is the same as (a) , and [y x <- [1..], y <- []] is just [] . (define (list . xs) xs) are are : do { [1,2,3] ; [4,5] } => do { x <- [1,2,3] ; do { y <- [4,5] ; return y }} => for x from [1,2,3] { for y from [4,5] { yield y }} => [ 4,5, 4,5, 4,5 ] Is your ( programming ) language ( high-level ) enough?
©