]> Cypherpunks repositories - gostls13.git/commitdiff
container/list: document complexity of Len
authorRobert Griesemer <gri@golang.org>
Tue, 30 Jul 2013 20:35:14 +0000 (13:35 -0700)
committerRobert Griesemer <gri@golang.org>
Tue, 30 Jul 2013 20:35:14 +0000 (13:35 -0700)
Fixes #5972.

R=golang-dev, adonovan
CC=golang-dev
https://golang.org/cl/12125043

src/pkg/container/list/list.go

index 562a5badbd3e209d34056261fbc7c9a19b2c1a8e..20d612ef9a4174b2b090f6a09efc25d85666978a 100644 (file)
@@ -62,6 +62,7 @@ func (l *List) Init() *List {
 func New() *List { return new(List).Init() }
 
 // Len returns the number of elements of list l.
+// The complexity is O(1).
 func (l *List) Len() int { return l.len }
 
 // Front returns the first element of list l or nil