We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 569ad22 + e0c8738 commit f5b68c1Copy full SHA for f5b68c1
Linked List/LinkedList.playground/Contents.swift
@@ -3,10 +3,6 @@
3
// For best results, don't forget to select "Show Rendered Markup" from XCode's "Editor" menu
4
5
//: Linked List Class Declaration:
6
-// last checked with Xcode 9.0b4
7
-#if swift(>=4.0)
8
-print("Hello, Swift 4!")
9
-#endif
10
11
public final class LinkedList<T> {
12
@@ -459,7 +455,7 @@ var sum = 0
459
455
for element in collection {
460
456
sum += element
461
457
}
462
-// sum is 15
458
+sum //15
463
464
// Another way of achieving the same result though 'reduce', another method defined in an extension of Sequence. Collections are Sequences.
465
let result = collection.reduce(0) {$0 + $1} // 15
0 commit comments