@@ -526,7 +526,7 @@ Swift 5.1
526
526
Duplicate tuple element labels are no longer allowed, because it leads
527
527
to incorrect behavior. For example:
528
528
529
- ```
529
+ ``` swift
530
530
let dupLabels: (foo: Int , foo: Int ) = (foo : 1 , foo : 2 )
531
531
532
532
enum Foo { case bar (x : Int , x : Int ) }
@@ -538,7 +538,7 @@ Swift 5.1
538
538
Note: You can still use duplicate argument labels when declaring functions and
539
539
subscripts, as long as the internal parameter names are different. For example:
540
540
541
- ```
541
+ ``` swift
542
542
func foo (bar x : Int , bar y : Int ) {}
543
543
subscript (a x : Int , a y : Int ) -> Int {}
544
544
```
@@ -548,7 +548,7 @@ Swift 5.1
548
548
Functions can now hide their concrete return type by declaring what protocols
549
549
it conforms to instead of specifying the exact return type:
550
550
551
- ```
551
+ ``` swift
552
552
func makeMeACollection () -> some Collection {
553
553
return [1 , 2 , 3 ]
554
554
}
@@ -6755,7 +6755,7 @@ Swift 1.0
6755
6755
6756
6756
* A `map` method with the semantics of Haskell's `fmap` was added to
6757
6757
`Array < T> `. Map applies a function `f: T-> U` to the values stored in
6758
- the array and returns an Array < U> . So,
6758
+ the array and returns an ` Array < U> ` . So,
6759
6759
6760
6760
```swift
6761
6761
(swift) func names (x : Int []) -> String [] {
0 commit comments