You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, we used `zip` to define `itraverse` for lists. This led to
two problems:
1. Because the zip fused with the index generator, it could *not* fuse
with the argument.
2. I ran into situations where the zip *didn't* fuse with the index
generator, so my code ended up actually building *and saving* `[0..]`
as a CAF. That's a nasty space leak, as well as slow.
Writing `itraverse` for lists using `foldr` directly seems to clear up
these issues. Unboxing the counter manually should prevent `Int` boxes
from being allocated when the passed function doesn't need them.
0 commit comments