Stop array from creating global symbol
This commit is contained in:
parent
76b1f987a2
commit
737502c4de
|
@ -14,9 +14,10 @@
|
|||
(let* ((this (gensym))
|
||||
(index-prefix (fuse this 'index))
|
||||
(indices (call static :create-indices length))
|
||||
(index-bindings (map (lambda (i) (list (fuse index-prefix i))) indices)))
|
||||
(index-bindings (map (lambda (i) `(,(fuse index-prefix i))) indices))
|
||||
(scope `((,this) ,@index-bindings)))
|
||||
|
||||
`(let ,index-bindings
|
||||
`(let ,scope
|
||||
(setq ,this
|
||||
(dlambda
|
||||
(:get (i)
|
||||
|
@ -31,13 +32,10 @@
|
|||
,length)
|
||||
|
||||
(t ()
|
||||
((lambda (indices accumulator)
|
||||
(if (null? indices)
|
||||
((lambda (length accumulator)
|
||||
(if (< length 1)
|
||||
accumulator
|
||||
(recur
|
||||
(rest indices)
|
||||
(cons
|
||||
(call ,this :get (first indices))
|
||||
accumulator))))
|
||||
(reverse ',indices)
|
||||
nil))))))))
|
||||
(- length 1)
|
||||
(cons (call ,this :get (- length 1)) accumulator))))
|
||||
,length nil))))))))
|
||||
|
|
Loading…
Reference in New Issue