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

Implement pangram #132

Merged
merged 1 commit into from
Jun 5, 2016
Merged

Conversation

IanWhitney
Copy link
Contributor

@IanWhitney IanWhitney commented May 30, 2016

Implements the Pangram problem and follows the current canonical test
suite.

Implements the Pangram problem and follows the current canonical test
suite.

I'm putting the problem after scrabble score. I'm guessing that
Most implementations will use iter -> filter -> collect (though students
constantly surprise me with their great ideas). The track places
these iterator -> Higher Order Function problems around scrabble score &
hamming.
@IanWhitney IanWhitney force-pushed the implement_pangram branch from b50a468 to adc92c5 Compare June 3, 2016 12:27
@IanWhitney
Copy link
Contributor Author

Ok @exercism/rust this should be ready for your review.


pub fn is_pangram(sentence: &str) -> bool {
sentence.to_lowercase()
.chars()
Copy link
Contributor

Choose a reason for hiding this comment

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

The .graphemes iterator might be a better choice here:

http://www.steveklabnik.com/rust-issue-17340/#indexing-strings

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@EduardoBautista EduardoBautista Jun 3, 2016

Choose a reason for hiding this comment

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

@IanWhitney haha, that shows how long it's been since I've played with Rust. Code looks good to me, but now I am not so confident in my Rust review skills haha.

@IanWhitney IanWhitney merged commit 379c0a0 into exercism:master Jun 5, 2016

#[test]
#[ignore]
fn numbers_can_not_replace_numbers() {
Copy link
Member

Choose a reason for hiding this comment

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

numbers cannot replace letters, I presume

@IanWhitney IanWhitney deleted the implement_pangram branch July 1, 2016 14:42
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.

4 participants