Skip to content

Commit 8c99f33

Browse files
committed
[Concurrency]Exampleの修正
1 parent 4ea512e commit 8c99f33

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

language-guide/concurrency.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 並行処理\(Concurrency\)
22

3-
最終更新日: 2024/08/30
3+
最終更新日: 2025/02/01
44
原文: https://docs.swift.org/swift-book/LanguageGuide/Concurrency.html
55

66
非同期操作を行う。
@@ -19,7 +19,7 @@ Swift の言語サポートを使用せずに並行処理を書くことは可
1919
```swift
2020
listPhotos(inGallery: "夏休み") { photoNames in
2121
let sortedNames = photoNames.sorted()
22-
let name = sortedNames[1]
22+
let name = sortedNames[0]
2323
downloadPhoto(named: name) { photo in
2424
show(photo)
2525
}
@@ -52,7 +52,7 @@ func listPhotos(inGallery name: String) async -> [String] {
5252
```swift
5353
let photoNames = await listPhotos(inGallery: "夏休み")
5454
let sortedNames = photoNames.sorted()
55-
let name = sortedNames[1]
55+
let name = sortedNames[0]
5656
let photo = await downloadPhoto(named: name)
5757
show(photo)
5858
```

0 commit comments

Comments
 (0)