chengchingwen / chengchingwen/StructWalk.jl

what is `iscontainer` for?

Open
#8 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
20
Forks
3
PR merge metrics
No merged PRs in 30d

Description

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`.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.