Skip to content

Make word-count example more explicit to student #1461

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

Closed
gabriel376 opened this issue Feb 15, 2019 · 3 comments
Closed

Make word-count example more explicit to student #1461

gabriel376 opened this issue Feb 15, 2019 · 3 comments
Assignees

Comments

@gabriel376
Copy link

According to issue exercism/rust#788 by @atil, the exercise word-count could have more explicit examples (see also #869).

The only example available to student is: "olly olly in come free"

olly: 2
in: 1
come: 1
free: 1

which may cause the impression that the only delimiter is whitespace character.

However, the canonical-data has cases like line-break delimiters (one,\ntwo,\nthree) and exclusion of special characters (car: carpet as java: javascript!!&@$%^&).

The idea is to show more examples (or to show a not so obvious one) to student in problem statement about what is the expected output of the problem. We don't have to put all examples (which should be in the test cases itself) and I agree that README is just a high-level description (see #66), but we can make it more explicit.

@yawpitch
Copy link
Contributor

I've modified the example in #1542 such that a single example should handle most -- if not all -- of the edge cases. Along with the improved definition of a word that may be sufficient to close this one once merged.

@yawpitch yawpitch self-assigned this Jun 27, 2019
@yawpitch
Copy link
Contributor

Closed by merge of #1542.

@gabriel376
Copy link
Author

Thank you!

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

No branches or pull requests

2 participants