list-comprehension added by john00 on Fri Feb 7 23:44:09 2020
(define-syntax let-zip (syntax-rules () ((let-zip (var var* ...) (val val* ...) body ...) (let ((var val) (var* val*) ...) body ...)))) (define-syntax list-comprehension (syntax-rules (for in if) ((_ expression for symbols in lst) (map (lambda (values) (let-zip symbols values expression)) lst)))) (define L '((0 0) (1 11) (2 22) (3 33) (4 44) (5 55))) (list-comprehension (* x y) for (x y) in L)