From c1c242192f14c47fd10e3953fdd22d665841661d Mon Sep 17 00:00:00 2001 From: Eric Hanson <5846501+ericphanson@users.noreply.github.com> Date: Tue, 5 Oct 2021 15:03:47 +0200 Subject: [PATCH] document the order --- src/functor.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/functor.jl b/src/functor.jl index e082cd6..07295fb 100644 --- a/src/functor.jl +++ b/src/functor.jl @@ -149,7 +149,8 @@ fmapstructure(f, x; kwargs...) = fmap(f, x; walk = (f, x) -> map(f, children(x)) fcollect(x; exclude = v -> false) Traverse `x` by recursing each child of `x` as defined by [`functor`](@ref) -and collecting the results into a flat array. +and collecting the results into a flat array, ordered by a breadth-first +traversal of `x`, respecting the iteration order of `children` calls. Doesn't recurse inside branches rooted at nodes `v` for which `exclude(v) == true`.