← Back to context

Comment by shawn_w

8 hours ago

When the accumulator isn't the second argument in a fold, left or right, it feels wrong and I waste some time cursing whomever made a silly mistake like getting the order wrong.

You want the accumulator second to match up with `cons` and similar functions that expect an initial/existing value second.

Luckily the functional languages I use the most are sane in that respect.