added missing definition for list*
This commit is contained in:
parent
c7dd5cc99c
commit
7e3baee864
|
@ -846,6 +846,19 @@ if(this['plt'] === undefined) { this['plt'] = {}; }
|
|||
return result;
|
||||
});
|
||||
|
||||
installPrimitiveProcedure(
|
||||
'list*',
|
||||
plt.baselib.arity.makeArityAtLeast(1),
|
||||
function(MACHINE) {
|
||||
var result = checkList(MACHINE, 'list*', MACHINE.argcount - 1);
|
||||
for (var i = MACHINE.argcount - 2; i >= 0; i--) {
|
||||
result = makePair(MACHINE.env[MACHINE.env.length - 1 - i],
|
||||
result);
|
||||
}
|
||||
return result;
|
||||
});
|
||||
|
||||
|
||||
installPrimitiveProcedure(
|
||||
'list-ref',
|
||||
2,
|
||||
|
|
|
@ -300,7 +300,7 @@ exact?
|
|||
;; cdddr
|
||||
;; cadddr
|
||||
length
|
||||
;; list*
|
||||
list*
|
||||
list-ref
|
||||
;; list-tail
|
||||
append
|
||||
|
|
|
@ -52,9 +52,9 @@
|
|||
(apply * `(,x ,(apply f (apply sub1 (apply list x '())) '())))]))
|
||||
|
||||
(f 0)
|
||||
;(f 1)
|
||||
;(f 2)
|
||||
;(f 3)
|
||||
;(f 4)
|
||||
;(f 5)
|
||||
;(+ (f 4) (f 5))
|
||||
(f 1)
|
||||
(f 2)
|
||||
(f 3)
|
||||
(f 4)
|
||||
(f 5)
|
||||
(+ (f 4) (f 5))
|
Loading…
Reference in New Issue
Block a user