* 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")
|
(foreign-call "ikrt_strftime" s "%F")
|
||||||
s)))
|
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
|
(primitive-set! 'command-line-arguments
|
||||||
(make-parameter ($arg-list)
|
(make-parameter ($arg-list)
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
|
|
||||||
(library (ikarus lists)
|
(library (ikarus lists)
|
||||||
(export $memq list? list make-list append length list-ref reverse last-pair
|
(export $memq list? list list* make-list append length list-ref reverse
|
||||||
memq memv member assq assv assoc
|
last-pair memq memv member assq assv assoc
|
||||||
map for-each andmap ormap)
|
map for-each andmap ormap)
|
||||||
(import
|
(import
|
||||||
(only (scheme) $car $cdr $fx+ $fxadd1 $fxsub1 $fxzero? $fx>=)
|
(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
|
memq memv member assq assv assoc
|
||||||
map for-each andmap ormap))
|
map for-each andmap ormap))
|
||||||
|
|
||||||
|
@ -19,6 +20,15 @@
|
||||||
|
|
||||||
(define list (lambda x x))
|
(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?
|
(define list?
|
||||||
(letrec ([race
|
(letrec ([race
|
||||||
(lambda (h t)
|
(lambda (h t)
|
||||||
|
|
Loading…
Reference in New Issue