Files
marqdo/tests/lib/table-list-mid.mq.md
T
cflmyandCursor 7d86ed1d9c feat(stdlib): Mid M5 list algorithms and cli.parse
Thicken table with sort/unique/chunk/zip/flatten and add lib/cli
flag parsing, with golds and public demos.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-07 20:32:58 +08:00

32 lines
670 B
Markdown

---
title: table list mid smoke
import table:lib/table.mq.md
---
# main
*xs = > split value="3,1,2,1" sep=","*
*xs = > table.sort list=`xs`*
*s = > join value=`xs` sep=","*
> print text=`s`
*u = > table.unique list=`xs`*
*uj = > join value=`u` sep=","*
> print text=`uj`
*ch = > table.chunk list=`xs` size=2*
*n = > len `ch`*
> print text=`n`
*a = > split value="a,b" sep=","*
*b = > split value="1,2,3" sep=","*
*z = > table.zip a=`a` b=`b`*
*zn = > len `z`*
> print text=`zn`
*nested = > table.append list=None item=`a`*
*nested = > table.append list=`nested` item=`b`*
*flat = > table.flatten list=`nested`*
*fj = > join value=`flat` sep=","*
> print text=`fj`