Commits

Robert Smith  committed 3bc8d68

Return a permutation in the first generation of a perm-generator.

  • Participants
  • Parent commits eea6423

Comments (0)

Files changed (1)

File permutation-generation.lisp

         ;; We do this hackery to be able to emit the initial
         ;; (identity) perm. Initially PERM is just T -- not a vector.
         (if (not (vectorp perm))
-            (setf perm (iota-vector (1+ n)))
+            (progn
+              (setf perm (iota-vector (1+ n)))
+              (%make-perm :spec perm))
             (let ((next (next-perm perm n)))
               ;; If we are at the end, then set PERM to NIL.
               (if next