- (depth nil))
- (let ((new-graph
- (copy-template old-graph)))
- (ecase graph-completion-method
- ((nil
- :complete-links)
- (iterate-vertexes old-graph
- (lambda (vertex)
- (when (funcall test-fn vertex)
- (add-vertex new-graph (value vertex))))))
- ((:complete-closure-nodes-only
- :complete-closure-with-links)
- (let* ((old-graph-vertexes (collect-items old-graph :filter test-fn))
- (closure-vertexes
- (get-transitive-closure old-graph-vertexes depth)))
- (dolist (vertex closure-vertexes)
- (add-vertex new-graph (copy-template vertex))))))
-
- (ecase graph-completion-method
+ (depth nil)
+ (new-graph
+ (copy-template old-graph)))
+ (ecase graph-completion-method
+ ((nil
+ :complete-links)
+ (iterate-vertexes old-graph
+ (lambda (vertex)
+ (when (funcall test-fn vertex)
+ (add-vertex new-graph (value vertex))))))
+ ((:complete-closure-nodes-only
+ :complete-closure-with-links)
+ (let* ((old-graph-vertexes (collect-items old-graph :filter test-fn))
+ (closure-vertexes
+ (get-transitive-closure old-graph-vertexes depth)))
+ (dolist (vertex closure-vertexes)
+ (add-vertex new-graph (copy-template vertex))))))
+ (ecase graph-completion-method