Commits

Robert Smith committed 4507757

Fix most of the SBCL compilation issues from Issue #4. (Still have an
"unreachable code" note.)

  • Participants
  • Parent commits 688a165

Comments (0)

Files changed (1)

src/permutation.lisp

   (let ((read-list (read-delimited-list #\] stream t)))
     (assert-valid-permutation-elements read-list)
 
-    (%make-perm :spec (coerce (cons 0 read-list) 'vector))))
+    (%make-perm :spec (make-array (1+ (length read-list))
+                                  :element-type 'perm-element
+                                  :initial-contents (cons 0 read-list)))))
 
 (defun enable-perm-reader ()
   "Enable the use of #[...] for perms."
 (defun orbit-of (n perm)
   "Compute the orbit of the element N in the permutation PERM. Return a cycle representing the orbit of N."
   (loop :with len := (orbit-length n perm)
-        :with spec := (make-array len :element-type 'perm-element
-                                      :initial-element n)
+        :with spec := (make-array len :initial-element n)
         :for i :from 1 :below len
         :for k := (perm-eval perm n) :then (perm-eval perm k)
         :until (= n k)