File tree 1 file changed +17
-17
lines changed
1 file changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ public struct Queue<Element>: CustomStringConvertible, Sequence {
80
80
:description: Constructor.
81
81
*/
82
82
public init ( ) {
83
- list = DoublyLinkedList < Element > ( )
83
+ list = DoublyLinkedList ( )
84
84
}
85
85
86
86
//
@@ -89,7 +89,7 @@ public struct Queue<Element>: CustomStringConvertible, Sequence {
89
89
// the next value in the sequence of nodes.
90
90
// :returns: Queue.Generator
91
91
//
92
- public func makeIterator( ) -> Queue . Iterator {
92
+ public func makeIterator( ) -> Iterator {
93
93
return list. makeIterator ( )
94
94
}
95
95
@@ -118,21 +118,21 @@ public struct Queue<Element>: CustomStringConvertible, Sequence {
118
118
mutating public func removeAll( ) {
119
119
list. removeAll ( )
120
120
}
121
- }
122
121
123
- public func + < Element > ( lhs: Queue < Element > , rhs: Queue < Element > ) -> Queue < Element > {
124
- var q = Queue < Element > ( )
125
- for x in lhs {
126
- q. enqueue ( x)
127
- }
128
- for x in rhs {
129
- q. enqueue ( x)
130
- }
131
- return q
132
- }
122
+ public static func + ( lhs: Queue , rhs: Queue ) -> Queue < Element > {
123
+ var q = Queue < Element > ( )
124
+ for x in lhs {
125
+ q. enqueue ( x)
126
+ }
127
+ for x in rhs {
128
+ q. enqueue ( x)
129
+ }
130
+ return q
131
+ }
133
132
134
- public func += < Element> ( lhs: inout Queue < Element > , rhs: Queue < Element > ) {
135
- for x in rhs {
136
- lhs. enqueue ( x)
137
- }
133
+ public static func += ( lhs: inout Queue , rhs: Queue ) {
134
+ for x in rhs {
135
+ lhs. enqueue ( x)
136
+ }
137
+ }
138
138
}
You can’t perform that action at this time.
0 commit comments