MCPcopy
hub / github.com/adonovan/gopl.io / Example_two

Function Example_two

ch6/intset/intset_test.go:33–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31}
32
33func Example_two() {
34 var x IntSet
35 x.Add(1)
36 x.Add(144)
37 x.Add(9)
38 x.Add(42)
39
40 //!+note
41 fmt.Println(&x) // "{1 9 42 144}"
42 fmt.Println(x.String()) // "{1 9 42 144}"
43 fmt.Println(x) // "{[4398046511618 0 65536]}"
44 //!-note
45
46 // Output:
47 // {1 9 42 144}
48 // {1 9 42 144}
49 // {[4398046511618 0 65536]}
50}

Callers

nothing calls this directly

Calls 2

AddMethod · 0.95
StringMethod · 0.95

Tested by

no test coverage detected