You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -70,8 +68,7 @@ public struct SinglyLinkedListForwardIterator<T> : IteratorProtocol {
70
68
71
69
private(set) var head: SinglyLinkedListNode<T>?
72
70
73
-
mutating public func next() -> T?
74
-
{
71
+
mutating public func next() -> T? {
75
72
let result = self.head?.value
76
73
self.head = self.head?.next
77
74
return result
@@ -82,8 +79,7 @@ public struct SinglyLinkedListForwardIterator<T> : IteratorProtocol {
82
79
Next, a collection needs to be indexable. Indexes are implemented by the data structure class. We have encapsulated this knowledge in instances of the class `SinglyLinkedListIndex`.
83
80
84
81
```
85
-
public struct SinglyLinkedListIndex<T> : Comparable
86
-
{
82
+
public struct SinglyLinkedListIndex<T>: Comparable {
0 commit comments