File tree Expand file tree Collapse file tree 1 file changed +36
-36
lines changed
Rootish Array Stack/RootishArrayStack.playground Expand file tree Collapse file tree 1 file changed +36
-36
lines changed Original file line number Diff line number Diff line change @@ -144,38 +144,38 @@ extension RootishArrayStack: CustomStringConvertible {
144144}
145145
146146var list = RootishArrayStack < String > ( )
147- list. isEmpty // true
148- list. first // nil
149- list. last // nil
150- list. count // 0
151- list. capacity // 0
147+ list. isEmpty // true
148+ list. first // nil
149+ list. last // nil
150+ list. count // 0
151+ list. capacity // 0
152152
153153list. memoryDescription
154154// {
155155// }
156156
157157list. append ( element: " Hello " )
158- list. isEmpty // false
159- list. first // "Hello"
160- list. last // "hello"
161- list. count // 1
162- list. capacity // 1
158+ list. isEmpty // false
159+ list. first // "Hello"
160+ list. last // "hello"
161+ list. count // 1
162+ list. capacity // 1
163163
164164list. memoryDescription
165165// {
166166// [Optional("Hello")]
167167// }
168168
169169list. append ( element: " World " )
170- list. isEmpty // false
171- list. first // "Hello"
172- list. last // "World"
173- list. count // 2
174- list. capacity // 3
170+ list. isEmpty // false
171+ list. first // "Hello"
172+ list. last // "World"
173+ list. count // 2
174+ list. capacity // 3
175175
176- list [ 0 ] // "Hello"
177- list [ 1 ] // "World"
178- //list[2] // crash!
176+ list [ 0 ] // "Hello"
177+ list [ 1 ] // "World"
178+ //list[2] // crash!
179179
180180
181181list. memoryDescription
@@ -186,15 +186,15 @@ list.memoryDescription
186186
187187
188188list. insert ( element: " Swift " , atIndex: 1 )
189- list. isEmpty // false
190- list. first // "Hello"
191- list. last // "World"
192- list. count // 3
193- list. capacity // 6
189+ list. isEmpty // false
190+ list. first // "Hello"
191+ list. last // "World"
192+ list. count // 3
193+ list. capacity // 6
194194
195- list [ 0 ] // "Hello"
196- list [ 1 ] // "Swift"
197- list [ 2 ] // "World"
195+ list [ 0 ] // "Hello"
196+ list [ 1 ] // "Swift"
197+ list [ 2 ] // "World"
198198
199199list. memoryDescription
200200// {
@@ -203,17 +203,17 @@ list.memoryDescription
203203// [nil, nil, nil]
204204// }
205205
206- list. remove ( atIndex: 2 ) // "World"
207- list. isEmpty // false
208- list. first // "Hello"
209- list. last // "Swift"
210- list. count // 2
211- list. capacity // 3
206+ list. remove ( atIndex: 2 ) // "World"
207+ list. isEmpty // false
208+ list. first // "Hello"
209+ list. last // "Swift"
210+ list. count // 2
211+ list. capacity // 3
212212
213- list [ 0 ] // "Hello"
214- list [ 1 ] // "Swift"
215- //list[2] // crash!
213+ list [ 0 ] // "Hello"
214+ list [ 1 ] // "Swift"
215+ //list[2] // crash!
216216
217217list [ 0 ] = list [ 1 ]
218218list [ 1 ] = " is awesome "
219- list // ["Swift", "is awesome"]
219+ list // ["Swift", "is awesome"]
You can’t perform that action at this time.
0 commit comments