Skip to content

Commit 2ef1828

Browse files
amartini51Colleen Toporek
andcommitted
Incorporate edits; remove stale query
Co-authored-by: Colleen Toporek <colleen_toporek@apple.com>
1 parent 6f5b73e commit 2ef1828

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

TSPL.docc/LanguageGuide/ControlFlow.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,9 +1484,9 @@ The `for`-`in` loop above iterates over an array of tuples,
14841484
binding the first and second elements of the tuples
14851485
to the `x` and `y` constants.
14861486
The statements inside the loop can use those constants,
1487-
like the `if` statement that checks whether the point lies on the x-axis.
1487+
such as the `if` statement that checks whether the point lies on the x-axis.
14881488
A more concise way to write this code
1489-
is to combine the value bindings and condition,
1489+
is to combine the value bindings and condition
14901490
using a `for`-`case`-`in` loop.
14911491
The code below has the same behavior as the `for`-`in` loop above:
14921492

@@ -2074,8 +2074,6 @@ without wrapping it in an `else` block,
20742074
and it lets you keep the code that handles a violated requirement
20752075
next to the requirement.
20762076

2077-
<!-- XXX show guard-case syntax for completeness? -->
2078-
20792077
## Deferred Actions
20802078

20812079
Unlike control-flow constructs like `if` and `while`,

TSPL.docc/LanguageGuide/Enumerations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ if case .qrCode(let productCode) = productBarcode {
495495
Just like in the switch statement earlier,
496496
the `productBarcode` variable is matched against
497497
the pattern `.qrCode(let productCode)` here.
498-
And like in the switch case,
498+
And as in the switch case,
499499
writing `let` extracts the associated value as a constant.
500500
For more information about `if`-`case` statements,
501501
see <doc:ControlFlow#Patterns>.
@@ -546,7 +546,7 @@ to give an enumeration an additional value,
546546
it's important to understand the difference between them.
547547
You pick the raw value for an enumeration case
548548
when you define that enumeration case in your code,
549-
like the three ASCII codes above.
549+
such as the three ASCII codes above.
550550
The raw value for a particular enumeration case is always the same.
551551
In contrast,
552552
you pick associated values when you create a new constant or variable

0 commit comments

Comments
 (0)