Should I conceptualize a right fold as "folding the list to the right" or as "folding a list from the right"?
In other words, does a right fold go from left-to-right or from right-to-left?
Should I conceptualize a right fold as "folding the list to the right" or as "folding a list from the right"?
In other words, does a right fold go from left-to-right or from right-to-left?
Right fold goes from right to left.
Left fold goes from the left, like you read a text - from left to right.