66
65
"banana": 3, "apple": 2, "pear": 4,
72
72
for value, priority := range items {
80
82
// Insert a new item and then modify its priority.
86
88
pq.update(item, item.value, 5)
88
90
// Take the items out; they arrive in decreasing priority order.
91
93
fmt.Printf("%.2d:%s ", item.priority, item.value)