Closed BooleanCat closed 8 months ago
@myusko What do you think of this format for iterators that yield generic values?
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
b178f7a
) 100.00% compared to head (90299ef
) 100.00%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I'm not sure if I prefer Iterator<Map, type=string>
or Iterator<Map, type=(int, string)>
. Since the underlying iterator doesn't matter, perhaps the unput type for maps isn't important and I should only print the output type.
I'm not sure if I prefer
Iterator<Map, type=string>
orIterator<Map, type=(int, string)>
. Since the underlying iterator doesn't matter, perhaps the unput type for maps isn't important and I should only print the output type.
Yes, I support your idea, that it would be better to print the output format, e.g Iterator<Map, type=string>
and I can beat that someone will be slightly confused with the Iterator<Map, type=(int, string)>
format, someone will consider the Map
as not a function that doing something with the input, but as a real hash table with (key, value) in our case (int, string)
🙂
Please provide a brief description of the change.
Support Stringer representation for
ChainIter
andMapIter
. This PR is a demonstration of the general pattern of string representations for Iterators that yield generic values (unlikeCounter
that always yields anint
).Which issue does this change relate to?
81
Contribution checklist.
make check
)make test
)