@@ -2,5 +2,274 @@
2navhome: /docs/
2navhome: /docs/
6# 2m: container from noun
5# 2m: container from noun
11+Takes a null-terminated noun and produces a `list`.
15+`a` is a null-terminated noun.
36+`ly` is an alias for `le:nl`.
43+Takes a null-terminated noun and produces a `map.`
47+`a` is a noun composed of ordered pairs and terminated with `~`.
60+ > (my [['a' 1] ['b' 2] ~])
61+ [n=[p='b' q=2] l={[p='a' q=1]} r={}]
65+`my` is an alias for `my:nl`.
72+Takes a null-terminated noun and produces a `set`.
76+`a` is a null-terminated noun.
92+ > (sy (ly [1 2 3 ~]))
96+ [n='b' l={'a' 'c'} r={}]
100+`sy` is an alias for `si:nl`.
105+Noun-to-container operations
107+Core whose arms contain functions that create various typed nouns from raw
120+Takes a null-terminated noun and produces a `list`.
124+`a` is a null-terminated noun.
135+ |% +- $ ?:(*? ~ [i=(snag 0 a) t=$])
152+Takes a null-terminated noun and produces a `map` of the same type of the `p`
157+`a` is a noun composed of ordered pairs and terminated with `~`.
167+ => .(a ^+((le a) a))
168+ (~(gas by `(map _p.i.-.a _q.i.-.a)`~) a)
172+ > (my:nl [['a' 1] ['b' 2] ~])
173+ [n=[p='b' q=2] l={[p='a' q=1]} r={}]
180+Takes a null-terminated noun and produces a `set`.
184+`a` is a null-terminated noun.
194+ => .(a ^+((le a) a))
195+ (~(gas in `(set _i.-.a)`~) a)
199+ > (si:nl `(list [@t *])`[['a' 1] ['b' [2 3]] ~])
200+ [n=['b' [2 3]] l={['a' 1]} r={}]
207+Produces the element at the index `a` of null-terminated noun `b` and failing if
208+ the noun is null. Lists are 0-indexed.
214+`b` is a null-terminated noun.
232+ > =b [[2 3] [1 4] ~]
245+Produces a list that is the concatenation of null-terminated nouns `a` and `b`.
249+`a` is a null-terminated noun.
251+`b` is a null-terminated noun.
260+ |* [a=(list) b=(list)]
261+ => .(a ^+((le a) a), b ^+((le b) b))
269+ > =b [[2 3] [1 4] ~]
271+ > (weld:nl b [8 9 ~])
272+ [i=[2 3] t=[i=[1 4] t=~[8 9]]]