Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

render_example_test.gno

0.63 Kb · 27 lines
 1package bitsetdemo
 2
 3// ExampleRender pins the realm's Render output as a testable example.
 4func ExampleRender() {
 5	print(Render(""))
 6	// Output:
 7	// # BitSet
 8	//
 9	// A dense bit vector, demoing the [`p/moul/x/daily/bitset`](/p/moul/x/daily/bitset/v0) library.
10	//
11	// ## Primes under 100
12	//
13	// **25** set bits in 100 bits of capacity:
14	//
15	// `2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97`
16	//
17	// ## Set algebra
18	//
19	// | set | bits |
20	// |---|---|
21	// | a | `1 2 3 5 8` |
22	// | b | `2 4 6 8 10` |
23	// | a ∪ b | `1 2 3 4 5 6 8 10` |
24	// | a ∩ b | `2 8` |
25	// | a \ b | `1 3 5` |
26	// | a △ b | `1 3 4 5 6 10` |
27}