From a55fe0370ac7013df3a4499f5c31ed87657389b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Axel=20S=C3=B8gaard?= Date: Sun, 7 Apr 2013 14:29:53 +0200 Subject: [PATCH] Fixed bug: Threading of Times over lists works now. --- bracket/bracket.rkt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bracket/bracket.rkt b/bracket/bracket.rkt index 065d751f5..703340a2e 100644 --- a/bracket/bracket.rkt +++ b/bracket/bracket.rkt @@ -441,7 +441,9 @@ (construct 'List (map (λ (u1i u2i) - (construct 'Times (simplify-times-rec (list u1i u2i)))) + (define us (simplify-times-rec (list u1i u2i))) + (cond [(empty? (rest us)) (first us)] + [else (construct 'Times us)])) (operands u1) (operands u2)))] [(and (list-expression? u1) (list-expression? u2)) ; lists of different lengths => do nothing