From ca16f25cf1568287f2c95699187fadd4e64be804 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 9 May 2011 14:27:45 -0600 Subject: [PATCH] fix `in-list' to check argument with `list?' --- originally left out on purpose for performance reasons, but it was not documented as missing a test, it's obviously better to check for a list, and JIT changes have made the `list?' test inexpensive --- collects/racket/private/for.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/racket/private/for.rkt b/collects/racket/private/for.rkt index cb1da46e7d..d5afd14517 100644 --- a/collects/racket/private/for.rkt +++ b/collects/racket/private/for.rkt @@ -537,7 +537,7 @@ #f)))))) (define (in-list l) - ;; (unless (list? l) (raise-type-error 'in-list "list" l)) + (unless (list? l) (raise-type-error 'in-list "list" l)) (make-list-stream l)) (define (:list-gen l) @@ -1519,7 +1519,7 @@ ;;outer bindings ([(lst) lst-expr]) ;; outer check - (void) ; (unless (list? lst) (in-list lst)) + (unless (list? lst) (in-list lst)) ;; loop bindings ([lst lst]) ;; pos check