Beta
Transform view
16sv90
Loading description...
Iterators
Algorithms
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.
https://www.codewars.com/kata/reviews/5883785e512b0330ff0003c9/groups/64f00dae18408b0001497ac8
The transform and filter katas are really nice, figuring out all the stuff required to implement a proper generic C++ iterator and please the type system was really interesting and challenging. But at the same time it's really bad that you authored 2 separate katas on the same topic. The solution to both of them is almost identical, the changes required to convert
map
tofilter
(or vice-versa) are trivial, and as soon as one kata gets approved, the other will instantly turn into a duplicate. You should either rework them into one asking to implement bothmap
andfilter
, or simply unpublish one of the katas, as they will not survive together.@sv90 are you going to address this issue somehow? If not, I think I'll open an issue on CW github, so that the community can decide what do with these 2 katas (unless somebody comes up with a reason why none of them should be approved at all - in fact, these katas might become obsolete with the introduction of C++20 support on CW in the future, so this case is quite possible too).
f might apply to a element multiple amount of time. Should test for single application of f as well.
I don't understand what you mean. Could you please provide an example of what you mean?
suppose we have a iterator
iter
of a transformed view dereferencing iter will call function F once dereferencing again will call function F another time but if it can be cached so function F is only called once until you increment iter.I wasn't sure weather that would impose too much overhead. So I tested the following code using the reference implementation of the Ranges-TS
It prints
2
so there is no caching here. I would like to keep this kata close to the proposal so I wont force the solutions to be cached. I hope you agree.This reason make sense to me.