exercism / fsharp

Exercism exercises in F#.
https://exercism.org/tracks/fsharp
MIT License
107 stars 101 forks source link

Add new test for grade-school exersice #1204

Closed Grenkin1988 closed 10 months ago

Grenkin1988 commented 10 months ago

Hello,

Exercise have this description:

Get a sorted list of all students in all grades. Grades should sort as 1, 2, 3, etc., and students within a grade should be sorted alphabetically by name. "Who all is enrolled in school right now?" "Let me think. We have Anna, Barb, and Charlie in grade 1, Alex, Peter, and Zoe in grade 2 and Jim in grade 5. So the answer is: Anna, Barb, Charlie, Alex, Peter, Zoe and Jim"

Given that all tests are using add function as part of the school preparation, we never test that roster function handles the case when input school was not sorted.

github-actions[bot] commented 10 months ago

Hello. Thanks for opening a PR on Exercism 🙂

We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in.

You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch.

If you're interested in learning more about this auto-responder, please read this blog post.


Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.

ErikSchierboom commented 10 months ago

Thanks for the PR, but I'm not sure we should be merging this. The problem with the newly added test is that it forces an implementation upon the student. We deliberately don't force the student to use a map, as they're then free to implement as they see fit.

Grenkin1988 commented 10 months ago

Thanks for the PR, but I'm not sure we should be merging this. The problem with the newly added test is that it forces an implementation upon the student. We deliberately don't force the student to use a map, as they're then free to implement as they see fit.

Sorry I do not 100% understand this. Do you mean that it is OK for student to remove type alias and do something else instead?

ErikSchierboom commented 10 months ago

Oh the type alias is still there? I thought I had removed that 😕 It's fine then!

Grenkin1988 commented 10 months ago

Yes, it uses type School = Map<int, string list>