Skip to content

Commit beddc9a

Browse files
authored
Updated syntax for Swift 3
Hello, I was recreating this file in playground and I noticed you still had the explicit @NoEscape . Thought I can lend a hand by removing it. Thanks for this awesome repository!
1 parent cd3ec11 commit beddc9a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Binary Tree/BinaryTree.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,26 @@ extension BinaryTree: CustomStringConvertible {
2929
}
3030

3131
extension BinaryTree {
32-
public func traverseInOrder(@noescape process: T -> Void) {
32+
public func traverseInOrder(process: T -> Void) {
3333
if case let .node(left, value, right) = self {
34-
left.traverseInOrder(process)
34+
left.traverseInOrder(process: process)
3535
process(value)
36-
right.traverseInOrder(process)
36+
right.traverseInOrder(process: process)
3737
}
3838
}
3939

40-
public func traversePreOrder(@noescape process: T -> Void) {
40+
public func traversePreOrder(process: T -> Void) {
4141
if case let .node(left, value, right) = self {
4242
process(value)
43-
left.traversePreOrder(process)
44-
right.traversePreOrder(process)
43+
left.traversePreOrder(process: process)
44+
right.traversePreOrder(process: process)
4545
}
4646
}
4747

48-
public func traversePostOrder(@noescape process: T -> Void) {
48+
public func traversePostOrder(process: T -> Void) {
4949
if case let .node(left, value, right) = self {
50-
left.traversePostOrder(process)
51-
right.traversePostOrder(process)
50+
left.traversePostOrder(process: process)
51+
right.traversePostOrder(process: process)
5252
process(value)
5353
}
5454
}

0 commit comments

Comments
 (0)