Skip to content

Commit

Permalink
fixed incorrect docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Reed Es committed Nov 18, 2021
1 parent ee30544 commit 827604c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions Sources/SimpleTree.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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]()
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 827604c

Please sign in to comment.