Beta
Matrix Transposing with Unfold
8Reki
Loading description...
Matrix
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
The
untranspose . untranspose == id
tests only run for singleton lists. The chance of generating a list of equally long lists is small, very small. You should be using a custom generator.The
equal, non null
tests do not run at all. The chance of generating a non-empty list of equal elements is negligible. You should be using a custom generator.The last test is a complete non-sequitur. As a solver, I have no idea what it means when it runs, and I can't look into the test until I've passed it. Given
unconsCol _ = Nothing
, it just crashes (head: empty list
). You're assuming things about the output which may not be true.Please try to write maximally readable code for random testing. Anybody doing maintenance ( this may be you in six months' time! ) will thank you. Resist the urge to use pointfree lambdacases - just write out the stuff, and don't go plucking arguments out of thin air.
The
describe
wrapper means all yourit
headers are invisible, because thedescribe
is collapsed by default. Clean, but possibly not what you intended. I wouldn't mind seeing a bit more green on success. :]Thanks for the advice, I probably won't have time to fix it for a while though.