leftiness / hex_math

MIT License
4 stars 1 forks source link

Convert denumerate() function into an iterator adapter #84

Open leftiness opened 7 years ago

leftiness commented 7 years ago

You can enumerate().. I want to denumerate().

my_iter
  .enumerate()
  .scan(/* ok */)
  .denumerate()
  .scan(/* yes */)

I wrote a denumerate() function and called it with iter().map(denumerate), but that feels inferior.