@@ -49,7 +49,7 @@ type DList<'T> (length: int, data: DListData<'T>) =
49
49
/// O(1). Returns the count of elememts.
50
50
member _.Length = length
51
51
52
- // O(n ). FoldBack walks the DList using constant stack space. Implementation is from Norman Ramsey.
52
+ // O(2n ). FoldBack walks the DList using constant stack space. Implementation is from Norman Ramsey.
53
53
// Called a "fold" in the article processes the linear representation from right to left
54
54
// and so is more appropriately implemented under the foldBack signature
55
55
// See http://stackoverflow.com/questions/5324623/functional-o1-append-and-on-iteration-from-first-element-list-data-structure/5334068#5334068
@@ -212,8 +212,7 @@ module DList =
212
212
[<GeneralizableValue>]
213
213
let empty < 'T > : DList < 'T > = DList( 0 , Nil)
214
214
215
- /// O(n). Fold walks the DList using constant stack space. Implementation is from Norman Ramsey.
216
- /// See http://stackoverflow.com/questions/5324623/functional-o1-append-and-on-iteration-from-first-element-list-data-structure/5334068#5334068
215
+ /// Fold walks the DList using constant stack space.
217
216
let foldBack ( f : 'T -> 'State -> 'State ) ( l : DList < 'T >) ( state : 'State ) = DList< 'T>. foldBack f l state
218
217
219
218
let fold ( f : 'State -> 'T -> 'State ) ( state : 'State ) ( l : DList < 'T >) = DList< 'T>. fold f state l
@@ -248,7 +247,7 @@ module DList =
248
247
/// O(log n). Returns option first element and tail.
249
248
let inline tryUncons ( l : DList < 'T >) = l.TryUncons
250
249
251
- /// O(n). Returns a DList of the seq.
250
+ /// Returns a DList of the seq.
252
251
let ofSeq s = DList< 'T>. ofSeq s
253
252
254
253
/// Iterates over each element of the list.
@@ -286,7 +285,7 @@ module DList =
286
285
coll.Close ()
287
286
#endif
288
287
289
- /// O(n). Returns a seq of the DList elements.
288
+ /// Returns a seq of the DList elements.
290
289
let inline toSeq ( l : DList < 'T >) = l :> seq< 'T>
291
290
292
291
let pairwise ( source : DList < 'T >) =
0 commit comments