StructWalk.jl
StructWalk.jl copied to clipboard
what is `iscontainer` for?
The purpose of iscontainer
and the role it plays in the walk is not clear from the documentation:
"""
iscontainer(s::WalkStyle, x)
Return a `Bool` indicating whether `children(x)` return a tuple of itself or not.
See also: [constructor](@ref), [children](@ref)
"""
In the walkstyle
docstring instead we have
1. [constructor](@ref): A proper constuctor for `T`, can be `identity` if `x` isa leaf.
2. [children](@ref): Children of `x` in a tuple, or empty tuple `()` if `x` is a leaf.
3. [iscontainer](@ref): A bool indicate whether element of 2. is the actual list of children. default to `false`.