diff --git a/src/ikarus.boot b/src/ikarus.boot index a79c21f..f105264 100644 Binary files a/src/ikarus.boot and b/src/ikarus.boot differ diff --git a/src/ikarus.core.ss b/src/ikarus.core.ss index d1c4cf9..e0fb20a 100644 --- a/src/ikarus.core.ss +++ b/src/ikarus.core.ss @@ -221,13 +221,6 @@ (foreign-call "ikrt_strftime" s "%F") s))) -(primitive-set! 'list* - (lambda (fst . rest) - (let f ([fst fst] [rest rest]) - (cond - [(null? rest) fst] - [else - (cons fst (f ($car rest) ($cdr rest)))])))) (primitive-set! 'command-line-arguments (make-parameter ($arg-list) diff --git a/src/ikarus.lists.ss b/src/ikarus.lists.ss index 51fe17a..8b990d6 100644 --- a/src/ikarus.lists.ss +++ b/src/ikarus.lists.ss @@ -1,11 +1,12 @@ (library (ikarus lists) - (export $memq list? list make-list append length list-ref reverse last-pair - memq memv member assq assv assoc + (export $memq list? list list* make-list append length list-ref reverse + last-pair memq memv member assq assv assoc map for-each andmap ormap) (import (only (scheme) $car $cdr $fx+ $fxadd1 $fxsub1 $fxzero? $fx>=) - (except (ikarus) list? list make-list append reverse last-pair length list-ref + (except (ikarus) list? list list* make-list append reverse last-pair + length list-ref memq memv member assq assv assoc map for-each andmap ormap)) @@ -19,6 +20,15 @@ (define list (lambda x x)) + + (define list* + (lambda (fst . rest) + (let f ([fst fst] [rest rest]) + (cond + [(null? rest) fst] + [else + (cons fst (f ($car rest) ($cdr rest)))])))) + (define list? (letrec ([race (lambda (h t)