chiark / gitweb /
utils/permute.lisp (demonstrate-permutation-network): Use keyword args.
[catacomb] / utils / permute.lisp
index 7d7cb563fcde2a6985801e34fd30dd25ce398a13..b41b4d46a74f82187ec1dca178e6dfe15423ccdb 100644 (file)
@@ -205,7 +205,9 @@ (defun print-permutation-network (steps &optional (stream *standard-output*))
     (terpri stream)))
 
 (defun demonstrate-permutation-network
-    (n steps &optional reference (stream *standard-output*))
+    (n steps
+     &key reference
+         (stream *standard-output*))
   "Print, on STREAM, a demonstration of the permutation STEPS.
 
    Begin, on the left, with the integers from 0 up to N - 1.  For each
@@ -769,13 +771,13 @@ (let* ((ip #(58 50 42 34 26 18 10  2
 
   (let ((benes-network (benes-search fixed-ip)))
     (print-permutation-network benes-network)
-    (demonstrate-permutation-network 64 benes-network fixed-ip))
+    (demonstrate-permutation-network 64 benes-network :reference fixed-ip))
   (terpri)
   (print-permutation-network trad-network)
-  (demonstrate-permutation-network 64 trad-network fixed-ip)
+  (demonstrate-permutation-network 64 trad-network :reference fixed-ip)
   (terpri)
   (print-permutation-network new-network)
-  (demonstrate-permutation-network 64 new-network fixed-ip))
+  (demonstrate-permutation-network 64 new-network :reference fixed-ip))
 
 #+example
 (benes-search-des #( 0  0  0  0