From c33d8e5d38f1adf2162122c71b2a1995cb1fb077 Mon Sep 17 00:00:00 2001 From: Mike Cifelli Date: Sun, 4 Feb 2018 09:36:37 -0500 Subject: [PATCH] Convert array to a list by default --- lisp/random/array.lisp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/random/array.lisp b/lisp/random/array.lisp index f68942d..4c73904 100644 --- a/lisp/random/array.lisp +++ b/lisp/random/array.lisp @@ -11,8 +11,9 @@ (eval (fuse ',index-prefix i))) (:set (i value) - (if (< i ,length) - (set (fuse ',index-prefix i) value))) + (if (and (< i ,length) (> i -1)) + (set (fuse ',index-prefix i) value) + (call ,this :get i))) ;; show error (:length () ,length) @@ -24,7 +25,7 @@ (recur (rest indices) (cons - (list (first indices) (call ,this :get (first indices))) + (call ,this :get (first indices)) accumulator)))) (reverse ',indices) nil)))))))