This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun partition (pred list) | |
"Split LIST into elements for which PRED returns true and false." | |
(let (true false) | |
(dolist (elt list) | |
(if (funcall pred elt) | |
(push elt true) | |
(push elt false))) | |
(cons (nreverse true) (nreverse false)))) | |
(defun connected-components (vertices adjacentp) |
OlderNewer