Why not only have for_each? What’s the need for for_each_with_index? Can’t for_each always pass the index and then it’s up to the user to use or ignore the returned index.
I’d like to see a short comment on each function that describes what it does and it’s input and output. Many of them are obvious just through their names but others need explanation I think.
I…don’t remember. I’ve been doing it for years, and I remember reading somewhere you should do it, but I can’t find it now…so maybe I made it up? I guess I’ll stop doing it, and change it.
I preferred to be explicit, if it’s more idiomatic to do that I’ll happily change it.
Can you give me some examples of which were confusing? Happy to comment, I’d just like to understand a bit better.
Well, the check would use a global M if that exists, otherwise create a new table to hold the module contents. Not sure why you’d want a global M though…
I have no string opinion about it, but to me it would have made more sense to always pass the index in for_each and then it’s up to the user to decide if it’s used or not.
Well, in general I prefer to have a readme (or generated docs from LDoc) to look at rather than having to go to the code to figure out that hash_util.reduce takes it’s arguments in the func, accumulator, hash order. I was also uncertain of what zip, stitch and partition did.