While coding this year's Advent of Code it would have been nice to have these Iterator methods. They exist in Ruby but are missing in Crystal. They are sometimes useful in this type of problems, where using Crystal is more fun :-P
Is there interest in these? I can submit a PR with a commit for each of these.
I guess the names can remain the same as in Ruby.
While coding the fifth day of Advent of Code it would have been nice to have String#swapcase and Char.swapcase methods. Yeah 馃檪
@mamantoha Hehe, indeed. At this point, given that swpacase's implementation is trivial, I'd say we could add it just fine.
to_h(&:block) from Ruby 2.6 could be nice to have too, if we are window shopping ruby methods :)
Please keep in mind though that a time travelling Santa solving elves puzzles is not entirely representing real world use cases.
Just to put some restraints on the shopping spree ;)
This is all done now :-)
(open a separate issue if you'd like swapcase, I'm still not sure it's that useful)
Most helpful comment
Please keep in mind though that a time travelling Santa solving elves puzzles is not entirely representing real world use cases.
Just to put some restraints on the shopping spree ;)