Skip to content

Commit 43f2916

Browse files
Replaced count == 0 with isEmpty
To make the playground example consistent with the the other file.
1 parent 77d2f55 commit 43f2916

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Stack/Stack.playground/Contents.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public struct Stack<T> {
2727
}
2828

2929
public mutating func pop() -> T? {
30-
if count == 0 {
30+
if isEmpty {
3131
return nil
3232
} else {
3333
return array.removeLast()

0 commit comments

Comments
 (0)