Enable NestedArray to process nested arrays iteratively instead of recursively.

Created on 6 May 2019, almost 6 years ago
Updated 31 July 2024, 9 months ago

Problem/Motivation

Taxonomy's TermStorage::loadTree method processes trees using a loop instead of recursion. It would be nice to have a generic form of this solution that could be used for any nested array.

Proposed resolution

The attached patch adds a process() method to the NestedArray class that enables it to run callables on the elements of a nested array without using recursion.

✨ Feature request
Status

Needs work

Version

11.0 πŸ”₯

Component
OtherΒ  β†’

Last updated about 19 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States c7bamford

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024