Puzzled by a declaration
Posted: Mon Oct 04, 2010 10:26 pm
I was looking at the source code for cl-dot and came across the functions defined below. In the first function, why declare 2 key parameters after the &rest , then declare they should be ignored, then pass the &rest parameter to a function that doesn't seem to use it, but rather wants the parameters which were declared ignore?
Sabra
Sabra
Code: Select all
(defun print-graph (graph &rest options
&key (stream *standard-output*) (directed t))
"Prints a dot-format representation GRAPH to STREAM."
(declare (ignore stream directed))
(apply #'generate-dot
(nodes-of graph)
(edges-of graph)
(attributes-of graph)
options))
(defun generate-dot (nodes edges attributes
&key (stream *standard-output*) (directed t))
....)