Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in generics book #61987

Merged
merged 4 commits into from
Nov 9, 2022
Merged

Fix typo in generics book #61987

merged 4 commits into from
Nov 9, 2022

Conversation

omochi
Copy link
Collaborator

@omochi omochi commented Nov 9, 2022

I found some typos in generics book.

@@ -4888,7 +4888,7 @@ \section{Primary Archetypes}\label{archetypesubst}

\paragraph{Archetypes are not ``inherited''} There's a potential pitfall worth mentioning. Recall that when generic declarations nest, the inner declaration inherits the generic parameters and requirements of the outer declaration, possibly adding new generic parameters or requirements:
\begin{Verbatim}
func myAlgorithm<S: Sequence>(_ seq: S) where S.Element: Comparable {
func complexAlgorithm<S: Sequence>(_ seq: S) where S.Element: Comparable {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is referred as complexAlgorithm on explanation text below.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes the line in the code display too long, so let's change the other reference to myAlgorithm instead.

@slavapestov
Copy link
Member

The other changes look good, thanks!

@omochi
Copy link
Collaborator Author

omochi commented Nov 9, 2022

@slavapestov I updated patch to change complexAlgorithm in text to myAlgorithm which is same with example code.

@slavapestov
Copy link
Member

@swift-ci Please smoke test and merge

@swift-ci swift-ci merged commit 521a615 into apple:main Nov 9, 2022
@omochi omochi deleted the fix-typo branch November 9, 2022 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants