From 4378d9c897e322b4cc309067cf2b9b1aa2e1157a Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Wed, 30 Dec 2015 16:13:35 -0800 Subject: [PATCH] [Stdlib] Tweak doc comment for Indexable.startIndex The complexity of this property may actually be O(N) for some lazy collections. Fixes SR-425. --- stdlib/public/core/Collection.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stdlib/public/core/Collection.swift b/stdlib/public/core/Collection.swift index f24f6798f92a7..426d3622e60eb 100644 --- a/stdlib/public/core/Collection.swift +++ b/stdlib/public/core/Collection.swift @@ -36,7 +36,8 @@ public protocol Indexable { /// /// In an empty collection, `startIndex == endIndex`. /// - /// - Complexity: O(1) + /// - Complexity: O(1) in most cases, possibly O(N) for some lazy + /// collections. var startIndex: Index {get} /// The collection's "past the end" position.