How should I conceptualize a right fold vs a left fold?

不羁的心 提交于 2019-12-12 04:56:36

问题


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?


回答1:


Right fold goes from right to left.

Left fold goes from the left, like you read a text - from left to right.



来源:https://stackoverflow.com/questions/28461908/how-should-i-conceptualize-a-right-fold-vs-a-left-fold

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!