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

[Proposal] Add isEven, isOdd, and isMultiple(of:) to BinaryInteger #891

Merged
merged 14 commits into from
Aug 17, 2018

Conversation

robmaceachern
Copy link
Contributor

This proposal adds var isEven: Bool, var isOdd: Bool, and func isMultiple(of other: Self) -> Bool to the BinaryInteger protocol. isEven and isOdd are convenience properties for querying the parity of the integer and isMultiple is a more general function to determine whether an integer is a multiple of another integer.

Swift-evolution thread: Even and Odd Integers

# Adding `isEven`, `isOdd`, `isMultiple` to `BinaryInteger`

* Proposal: [SE-NNNN](NNNN-binaryinteger-iseven-isodd.md)
* Authors: [Robert MacEachern](https://robmaceachern.com), [SiliconUnicorn](https://forums.swift.org/u/siliconunicorn/summary)
Copy link
Contributor

Choose a reason for hiding this comment

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

To follow the pattern used on Swift Evolution, I would like to suggest you to use the GitHub profile url address to link the authors.

e.g:

* Authors: [Robert MacEachern](https://github.com/robmaceachern), [SiliconUnicorn](https://forums.swift.org/u/siliconunicorn/summary)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated mine and have reached out to the other user to get his contact info.

@tkremenek tkremenek added the workgroup: ready This proposal seems to be ready for evolution review label Aug 15, 2018
@tkremenek
Copy link
Member

This review will be scheduled to start next Monday, August 20

@tkremenek tkremenek merged commit d263859 into swiftlang:master Aug 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
workgroup: ready This proposal seems to be ready for evolution review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants