File tree Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Original file line number Diff line number Diff line change @@ -331,33 +331,6 @@ extension SinglyLinkedList where T: Comparable {
331
331
332
332
333
333
334
- // MARK: - ITERATOR -
335
-
336
- public struct SinglyLinkedListForwardIterator < T> : IteratorProtocol {
337
-
338
- public typealias Element = T
339
-
340
- private( set) var head : SinglyLinkedListNode < T > ?
341
-
342
- mutating public func next( ) -> T ? {
343
- let result = head? . value
344
- head = head? . next
345
- return result
346
- }
347
- }
348
-
349
-
350
-
351
- // MARK: - SEQUENCE -
352
-
353
- extension SinglyLinkedList : Sequence {
354
- public func makeIterator( ) -> SinglyLinkedListForwardIterator < T > {
355
- return SinglyLinkedListForwardIterator ( head: storage. head)
356
- }
357
- }
358
-
359
-
360
-
361
334
// MARK: - COLLECTION -
362
335
363
336
extension SinglyLinkedList : Collection {
You can’t perform that action at this time.
0 commit comments