Commits

Robert Smith committed 8c1a9c4

Add PERM-EJECT to experimental functions.

  • Participants
  • Parent commits 7d7dad0

Comments (0)

Files changed (1)

extra-functions.lisp

                 (last-to-position (1+ (perm-size perm))
                                   inject-to)))
 
+(defun perm-eject (perm)
+  "Remove the largest element of a permutation."
+  ;; Here, we are going to do it the ugly way.
+  (let* ((size (perm-size perm))
+         (new-spec (remove size (perm.spec perm))))
+    (%make-perm :spec new-spec)))