on master help sign in
simplify example, clarify initial accumulator
e7adaa3drbeefsupreme
hoon/reference/stdlib/2b.md+7−7
@@ -564,7 +564,7 @@ the final value of the accumulator.
564(To "slam" means to call a gate and give it a sample/samples. In this instance,
564(To "slam" means to call a gate and give it a sample/samples. In this instance,
565`a` is the list of samples that are given to the gate b.)
565`a` is the list of samples that are given to the gate b.)
566
566
567−The initial value of the accumulator is the bunt of `b`'s second argument. This can occasionally produce
567+The initial value of the accumulator is the bunt of `b`'s second argument (`+<+`). This can occasionally produce
568undesired behavior (see examples). If you need more control over the initial
568undesired behavior (see examples). If you need more control over the initial
569value, try making use of `$_` and `|:`, or perhaps [`+spin`](#spin) or
569value, try making use of `$_` and `|:`, or perhaps [`+spin`](#spin) or
570[`+spun`](#spun).
570[`+spun`](#spun).
@@ -621,7 +621,7 @@ since that is the bunt of `@`:
621```
621```
622We can fix this with `|:`:
622We can fix this with `|:`:
623```
623```
624−> (reel `(list @)`~[1 2 3 4] |:([a=`@`1 b=`@`1] (mul a b)))
624+> (reel `(list @)`~[1 2 3 4] |:([a=1 b=1] (mul a b)))
62524
62524
626```
626```
627
627
@@ -639,10 +639,10 @@ producing the final value of the accumulator.
639(To "slam" means to call a gate and give it a sample/samples. In this instance,
639(To "slam" means to call a gate and give it a sample/samples. In this instance,
640`a` is the list of samples that are given to the gate b.)
640`a` is the list of samples that are given to the gate b.)
641
641
642−The initial value of the accumulator is `+>+.$`. This can occasionally produce
642+The initial value of the accumulator is `b`'s second argument (`+<+`). This can
643−unexpected behavior (see examples). If you need more control over the initial
643+occasionally produce undesired behavior (see examples). If you need more control
644−value, try making use of `$_` and `|:`, or perhaps [`+spin`](#spin) or
644+over the initial value, try making use of `$_` and `|:`, or perhaps
645−[`+spun`](#spun).
645+[`+spin`](#spin) or [`+spun`](#spun).
646
646
647#### Accepts
647#### Accepts
648
648
@@ -696,7 +696,7 @@ since that is the bunt of `@`:
696```
696```
697We can fix this with `|:`:
697We can fix this with `|:`:
698```
698```
699−> (roll `(list @)`~[1 2 3 4] |:([a=`@`1 b=`@`1] (mul a b)))
699+> (roll `(list @)`~[1 2 3 4] |:([a=1 b=1] (mul a b)))
70024
70024
701```
701```
702
702