Skip to content

Commit b9a9759

Browse files
committed
Merge pull request kodecocodes#39 from JovannyEspinal/patch-1
Replaced count == 0 with isEmpty
2 parents db64445 + 43f2916 commit b9a9759

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Stack/Stack.playground/Contents.swift

+1-1
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)