Back
bf-traverse (clj)
(source)function
(bf-traverse successors start & {:keys [f when seen]})
Traverses a graph breadth-first from start, successors being a
function that returns adjacent nodes. When :f is provided, returns a
lazy seq of (f node predecessor-map depth) for each node traversed.
Otherwise, returns a lazy seq of the nodes. When :when is provided,
filters successors with (f neighbor predecessor depth).