Re:Scala school
by fhars on Tuesday September 20, 2011 @01:18PM
(#3018514)
Also, right folds preserve the structure of the datatype folded over. If you fold right over a list with the empty list as the start value and cons (or (_::_) in scala) as the operation, you get the original list back (i.e. same value, not same object). A left fold on the other hand is just some arbitrary looping constuct.
[ Parent
| on HN ]
There are no comments on this comment yet.