* moved list* to ikarus.lists.
This commit is contained in:
parent
5150058773
commit
ed4267d1e4
BIN
src/ikarus.boot
BIN
src/ikarus.boot
Binary file not shown.
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue