<Blacksmoke16> new up some output array, using some heuristic to allow it to allocate once, use the block version of `each_permutation` to yield each permutation and push it to the allocated array
<Blacksmoke16> most optimal that i could think of off the top of my head*
what would be more useful, to return a list or to yield?
in python you would typically yield and the function would return an iterator, and then cast that to a list if need be
is it more useful to have a block consuming function than to return a list of object like I did here?
<threez> Hi I created a shard for PDF writing. I would like to get feedback as this is my first bigger crystal project. Maybe somehow here has the time for a review? https://github.com/threez/hpdf.cr
hholst has quit [Quit: Client closed]
threez: I haven't dug much into the functionality, but I can say that the code is very clean! I particularly appreciate the comments :)
ngp has joined #crystal-lang
<Blacksmoke16> could consider using enums for some stuff instead of modules with constants
<Blacksmoke16> would need to use another method to return the string representation tho, if you need those specific values