From 6a4b16d65b8ea3b665daf22121c84efd9c6b5982 Mon Sep 17 00:00:00 2001 From: Benedikt Ehinger Date: Mon, 5 Aug 2024 14:37:32 +0200 Subject: [PATCH] improve docs --- src/datastructure.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/datastructure.jl b/src/datastructure.jl index 4561035..4496618 100644 --- a/src/datastructure.jl +++ b/src/datastructure.jl @@ -338,7 +338,7 @@ postwalk(f, t::File; collect_children=identity) = f(t) apply `f` to every node in the tree. To only visit File nodes, pass `dirs=false`. -walk can be either `FileTrees.postwalk` or `FileTrees.postwalk`. +walk can be either `FileTrees.postwalk` or `FileTrees.prewalk`. Which applies the function after recursively walking the tree, or before. """ function Base.map(f, tree::FileTree; walk=postwalk, dirs=true) walk(tree, collect_children=identity) do n @@ -354,7 +354,7 @@ Return a copy of `tree`, removing nodes for which `f` is `false`. The function `f` is passed all nodes (`File`s and `FileTree`s) if `dirs=true` and leaf nodes (`File`s) if `dirs=false`. -`walk` can be either `FileTrees.postwalk` or `FileTrees.postwalk`. +`walk` can be either `FileTrees.postwalk` or `FileTrees.prewalk`. Which applies the function after recursively walking the tree, or before. """ function Base.filter(f, tree::FileTree; walk=prewalk, dirs=true) walk(tree, collect_children=cs->filter(!isnothing, cs)) do n