tag:blogger.com,1999:blog-5089773352404981635.post2627375863359959639..comments2023-10-04T08:15:13.812-07:00Comments on Daily scala: Collection/Iterable/Iterator foldRight and foldLeftAnonymoushttp://www.blogger.com/profile/07600430363435495915noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-5089773352404981635.post-50425984830348208622013-07-09T01:29:08.443-07:002013-07-09T01:29:08.443-07:00Jesse. Thanks for your posts which are generally h...Jesse. Thanks for your posts which are generally highly useful. I appreciate how you put the scala-ese into understandable terms. Would you be up to adding an example or two about fold itself?wwkuduhttps://www.blogger.com/profile/14015252946720521004noreply@blogger.comtag:blogger.com,1999:blog-5089773352404981635.post-78464553474909556282011-05-27T11:22:37.696-07:002011-05-27T11:22:37.696-07:00Fold left process from left to right
http://www.sc...Fold left process from left to right<br />http://www.scala-lang.org/api/current/index.html#scala.collection.Map<br /><br />"Applies a binary operator to a start value and all elements of this map, going left to right."Leszek Gruchałahttps://www.blogger.com/profile/00088047976523414378noreply@blogger.comtag:blogger.com,1999:blog-5089773352404981635.post-88333240411869897502009-10-30T01:08:16.148-07:002009-10-30T01:08:16.148-07:00You are right. I researched the issue to make sur...You are right. I researched the issue to make sure I had it correct and then went a head and put the wrong solution. <br /><br />I have updated the post with this fixAnonymoushttps://www.blogger.com/profile/07600430363435495915noreply@blogger.comtag:blogger.com,1999:blog-5089773352404981635.post-52242755405682594502009-10-29T21:23:14.489-07:002009-10-29T21:23:14.489-07:00You wrote that lists are better to process right t...You wrote that lists are better to process right to left but I believe that its the other way around. foldRight will in fact blow your stack because every object in your list will require a stack frame before processing can even start. See this stack overflow question for a complete explanation:<br />http://stackoverflow.com/questions/1446419<br /><br />- DavidAnonymousnoreply@blogger.com