Skip to content

✨ feat(mq-lang): add walk builtin function with tests#1936

Merged
harehare merged 2 commits into
mainfrom
feat/add-walk-builtin
Jun 27, 2026
Merged

✨ feat(mq-lang): add walk builtin function with tests#1936
harehare merged 2 commits into
mainfrom
feat/add-walk-builtin

Conversation

@harehare

Copy link
Copy Markdown
Owner
  • Add walk(v, f) that recursively applies f to every node in markdown, array, and dict structures (bottom-up traversal)
  • Fix dict case to use single-arg fn(entry) lambda to correctly match how with_entries passes each [key, value] pair
  • Add test_walk with 24 cases covering scalar, array, dict, and markdown inputs in builtin_tests.mq

Close #1828

- Add walk(v, f) that recursively applies f to every node in
  markdown, array, and dict structures (bottom-up traversal)
- Fix dict case to use single-arg fn(entry) lambda to correctly
  match how with_entries passes each [key, value] pair
- Add test_walk with 24 cases covering scalar, array, dict,
  and markdown inputs in builtin_tests.mq
@codspeed-hq

codspeed-hq Bot commented Jun 27, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing feat/add-walk-builtin (f2e993a) with main (43ef138)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (cebedc5) during the generation of this report, so 43ef138 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@harehare harehare merged commit 61cd65b into main Jun 27, 2026
11 checks passed
@harehare harehare deleted the feat/add-walk-builtin branch June 27, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add walk function

1 participant