* moved list* to ikarus.lists.

This commit is contained in:
Abdulaziz Ghuloum 2007-05-05 06:19:50 -04:00
parent 5150058773
commit ed4267d1e4
3 changed files with 13 additions and 10 deletions

Binary file not shown.

View File

@ -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)

View File

@ -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)