@@ -1046,23 +1046,23 @@ A list
10461046
10471047Gate to list, with state
10481048
1049−Accepts a `++list` `a`, a gate `b`, and some state `c`. Produces a list with
1050−the gate applied to each element of the original list. `b` is called with
1051−a tuple -- the head is an element of `a` and the tail is the state `c`, and
1049+Accepts a `++list` `a`, some state `b`, and a gate `c`. `c` is called with
1050+a tuple -- the head is an element of `a` and the tail is the state `b`, and
10521051should produce a tuple of the transformed element and the (potentially
1053−modified) state `c`.
1052+modified) state `b`. Produces a pair where the first element is a list of the
1053+transformed elements of `a`, and the second element is the final value of `b`.
10541054
10551055#### Accepts
10561056
10571057`a` is a `++list`.
10581058
1059−`b` is a gate.
1059+`b` is a noun.
10601060
1061−`c` is a noun.
1061+`c` is a gate.
10621062
10631063#### Produces
10641064
1065−A list.
1065+A pair of a list and a noun.
10661066
10671067#### Source
10681068
@@ -1082,20 +1082,20 @@ A list.
10821082#### Examples
10831083
10841084```
1085− > %^ spin (limo ~[4 5 6]) :: trivial example -- does nothing with the state
1086− |=([n=@ a=@] [n a])
1087− 0
1088− ~[4 5 6]
1085+ > %^ spin (limo ~[4 5 6]) :: Trivial example -- does nothing with the state
1086+ 0
1087+ |=([n=@ a=@] [n a])
1088+ [p=~[4 5 6] q=0]
10891089
1090− > %^ spin (limo ~[4 5 6]) :: `p` as the index and `q` as the list element
1091− |=([n=@ a=@] [`(pair)`[a n] +(a)])
1092− 0
1093− ~[[p=0 q=4] [p=1 q=5] [p=2 q=6]]
1090+ > %^ spin (limo ~[4 5 6]) :: Form a pair with `p` as the index and `q` as the list element
1091+ 0
1092+ |=([n=@ a=@] [`(pair)`[a n] +(a)])
1093+ [p=~[[p=0 q=4] [p=1 q=5] [p=2 q=6]] q=3]
10941094
10951095 > %^ spin (reap 10 0) :: Create 10 random numbers less than `10`
1096+ ~(. og eny)
10961097 |=([n=@ rng=_og] (rads:rng 10))
1097− ~(. og eny)
1098− ~[5 5 9 4 1 7 9 9 9 6]
1098+ [p=~[7 8 6 0 1 5 4 7 9 3] q=<4.rvi {a/@uvJ <51.qyl 129.pdd 41.mac 1.ane $141>}>]
10991099```
11001100
11011101#### Discussion