From 827604ca3f550a89b8e607382a0fc2249607d5a7 Mon Sep 17 00:00:00 2001 From: Reed Es Date: Thu, 18 Nov 2021 11:01:35 -0700 Subject: [PATCH] fixed incorrect docs --- README.md | 4 ++-- Sources/SimpleTree.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8533d56..6798716 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Types scoped within `SimpleTree`: - `func getChildren(excludeValues: ValueSet) -> [Node]`: Fetch the child nodes of the node. Optional list of values for children to be excluded, along with their progeny. Traversal is breadth-first. -- `func getChildren(maxDepth: Int, excludeValues: ValueSet) -> [Node]`: Fetch the child nodes of the node. Optional list of values for children to be excluded, along with their progeny. Traversal is depth-first, with optional limit. +- `func getChildren(maxDepth: Int, excludeValues: ValueSet) -> [Node]`: Fetch the child nodes of the node. Optional list of values for children to be excluded, along with their progeny. Traversal is depth-first. - `func getParent(excludeValues: ValueSet) -> Node?`: Return the immediate parent node, if any. Optional list of parent values to be excluded. A match will cause this function to return nil. @@ -70,7 +70,7 @@ Types scoped within `SimpleTree`: - `func getChildValues(excludeValues: ValueSet) -> [T]`: Fetch the values of the child nodes. Optional list of values for children to be excluded, along with their progeny. Traversal is breadth-first. -- `func getChildValues(maxDepth: Int, excludeValues: ValueSet) -> [T]`: Fetch the values of the child nodes. Optional list of values for children to be excluded, along with their progeny. Traversal is depth-first, with optional limit. +- `func getChildValues(maxDepth: Int, excludeValues: ValueSet) -> [T]`: Fetch the values of the child nodes. Optional list of values for children to be excluded, along with their progeny. Traversal is depth-first. - `func getParentValue(excludeValues: ValueSet) -> T?`: Return the value of the immediate parent node, if any. Optional list of parent values to be excluded. A match will cause this function to return nil. diff --git a/Sources/SimpleTree.swift b/Sources/SimpleTree.swift index 974f7e8..0ef097f 100644 --- a/Sources/SimpleTree.swift +++ b/Sources/SimpleTree.swift @@ -76,7 +76,7 @@ extension SimpleTree { /// Fetch the child nodes of the node. /// Optional list of values for children to be excluded, along with their progeny. - /// Traversal is depth-first, with optional limit. + /// Traversal is depth-first. public func getChildren(maxDepth: Int, excludeValues: ValueSet = ValueSet()) -> [Node] { guard maxDepth > 0 else { return [] } var nodes = [Node]() @@ -210,7 +210,7 @@ extension SimpleTree { /// Fetch the values of the child nodes. /// Optional list of values for children to be excluded, along with their progeny. - /// Traversal is depth-first, with optional limit. + /// Traversal is depth-first. public func getChildValues(maxDepth: Int, excludeValues: ValueSet = ValueSet()) -> [T] { getChildren(maxDepth: maxDepth, excludeValues: excludeValues).map(\.value) }