
21 Jul
2017
21 Jul
'17
9:16 p.m.
Very interesting! What do you mean by a "better" unfold?
Well you asked the original question, so I'll leave that up to you to define. ;) Your original version is relatively specialised, but simple and efficient. The one I adapted uses quite a bit of intermediate wrapping and unwrapping and needs to move parts around on every iteration. Only because of list fusion does it have a chance to compete. It's also quite indirect and uses up cognitive energy when trying to understand it. So yours is "better" in several ways. Maybe there's a general unfold that is easier to understand. Or more efficient. Or easier to adapt to more situations. It depends highly on what your actual goals areā¦