Xia Li-yao
Xia Li-yao
I had a brainfart moment. For a lazy reverse-into-string function, right now, the best safe solution seems to be using `unsnoc` as you did. Another way is to use `Data.Text.Unsafe.reverseIter`,...
A better implementation of `inits` would be welcome! The `Data.List` implementation seems like a good starting point. I am unsure about an implementation that concatenates chunks to produce later prefixes...
Is using a queue or a difference list as in OldList and bytestring worth it? Instead isn't it sufficient to keep only the length as an accumulator, so each prefix...
Thanks for finding that thread! @treeowl might you remember why the queue implementation of `inits` was chosen in the end instead of the simpler one relying on `take`? It is...
I was also quite surprised for a while but I found a simple explanation. I was wrongly assuming that Okasaki's banker's queue was somehow incurring unnecessary overhead. In fact, `take`...
It is lazy like the others. It uses unsafe primitives but it is entirely invisible for a user of `inits`, however they choose to force it.
Oh yes, I recently changed the build script in QuickChick, and forgot to update it on here. To be fixed by #18826
I can try doing this in Dune this week.
Oh right, sorry, let me have a look...
@lemonidas do you understand what's going on here?