阅读背景:

如何知道何时使用fold-left以及何时使用fold-right?

来源:互联网 

I'm aware that fold-left produces left-leaning trees and fold-right produces right-leaning trees, but when I reach for a fold, I sometimes find myself getting bogged down in headache-inducing thought trying to determine which kind of fold is appropriate. I usually end up unwinding the entire problem and stepping through the implementation of the fold function as it applies to my problem. I'm aware that fold-left produces left-leaning




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: