Skip to content

Commit 7a76e9c

Browse files
authored
Merge pull request kodecocodes#1 from alexpersian/alex/fixes-linked-list-typo
Changes class to enum and clarifies the reason why a copy is made
2 parents 9e9c84e + d321542 commit 7a76e9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Linked List/README.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ enum ListNode<T> {
555555
}
556556
```
557557

558-
The big difference with the class-based version is that any modification you make to this list will result in a *new copy* being created. Whether that's what you want or not depends on the application.
558+
The big difference with the enum-based version is that any modification you make to this list will result in a *new copy* being created because of [Swift's value semantics](https://developer.apple.com/swift/blog/?id=10). Whether that's what you want or not depends on the application.
559559

560560
[I might fill out this section in more detail if there's a demand for it.]
561561

0 commit comments

Comments
 (0)