Commit 6062515a authored by Andrew Gerrand's avatar Andrew Gerrand

container/list: document iteration

R=rsc
CC=golang-dev
https://golang.org/cl/2768042
parent 302b0ff9
......@@ -3,6 +3,12 @@
// license that can be found in the LICENSE file.
// The list package implements a doubly linked list.
//
// To iterate over a list (where l is a *List):
// for e := l.Front(); e != nil; e = e.Next() {
// // do something with e.Value
// }
//
package list
// Element is an element in the linked list.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment