marqdo

lib/table — collectionsok

stdlib/table.mq.md

文档

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`
打印 内容 =Authorizationaccess(h, "Authorization")
打印 内容 =1access(xs, "1")
打印 内容=`n`
Functions
Variables
  • description text
    put, append, and map helpers (code-as-docs pilot)
  • h map · 1
    AuthorizationBearer-demo
  • markup text
    occlusion
  • n int
    2
  • title text
    lib/table — collections
  • xs list · 2
    #value
    1A
    2b
可执行知识(辅助)

运行与结果

Bearer-demo A 2
完整源码
---
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`**

Variable