Files
marqdo/public/stdlib/table.mq.md
T
cflmyandCursor 687c168014 feat(parse): use nested YAML import: maps instead of one-liner binds
Frontmatter imports are now valid YAML (`import:` / `导入:` with bind→target
entries), removing spaced keys. Add `marqdo migrate imports`, hard-error the
old one-liner form, and migrate lib/ext/examples/tests/docs accordingly.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-23 19:33:58 +08:00

29 lines
610 B
Markdown

---
markup: occlusion
title: lib/table — collections
description: put, append, and map helpers (code-as-docs pilot)
import:
table: lib/table.mq.md
---
# main
Prefer table.put for element updates (at= text key, 1-based int, or list path).
Read with link-index get. Use json for parse/stringify only.
**`h` = [table.put] in=None at="Authorization" value="Bearer-demo"**
`xs` =
| v |
|---|
| a |
| b |
**`xs` = [table.put] in=`xs` at=1 value="A"**
**`n` = [table.rows] xs=`xs`**
**打印 内容=[Authorization](access(h, "Authorization"))**
**打印 内容=[1](access(xs, "1"))**
**打印 内容=`n`**