on master help sign in
corrected sieve example
8f4837fJoshua Reagan
docs/hoon/examples.md+5−6
@@ -26,7 +26,7 @@ its argument, an atom:
26=< abet:main :: 4
26=< abet:main :: 4
27|% :: 5
27|% :: 5
28++ abet :: 6
28++ abet :: 6
29− (sort (~(tap in field) ~) lth) :: 7
29+ (sort ~(tap in field) lth) :: 7
30:: :: 8
30:: :: 8
31++ main :: 9
31++ main :: 9
32 =/ factor/@ 2 :: 10
32 =/ factor/@ 2 :: 10
@@ -76,7 +76,7 @@ with the computation completed. `abet` then extracts the result.
76```
76```
77|% :: 5
77|% :: 5
78++ abet :: 6
78++ abet :: 6
79− (sort (~(tap in field) ~) lth) :: 7
79+ (sort ~(tap in field) lth) :: 7
80```
80```
81
81
82Line `5`: we wrap a core around our existing subject. The
82Line `5`: we wrap a core around our existing subject. The
@@ -84,10 +84,9 @@ Line `5`: we wrap a core around our existing subject. The
84remain accessible.
84remain accessible.
85
85
86Lines `6` and `7`: the `abet` arm, which produces the field as a
86Lines `6` and `7`: the `abet` arm, which produces the field as a
87−sorted list. `in` is the set core; `tap` is an arm which
87+sorted list. `in` is the set core; `tap` is an arm that exports
88−produces a gate that exports the set as a list, prepending it to
89−a tail which is nil in this case (and most cases). We sort this
90−list in ascending order with `lth` (less-than).
88+the set as a list. We sort this list in ascending order with
89+`lth` (less-than).
91
90
92```
91```
93++ main :: 9
92++ main :: 9