tag:blogger.com,1999:blog-5089773352404981635.post3141102731264345314..comments2023-10-04T08:15:13.812-07:00Comments on Daily scala: UnfoldLeft and RightAnonymoushttp://www.blogger.com/profile/07600430363435495915noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-5089773352404981635.post-38535274581808429782011-06-01T13:29:36.941-07:002011-06-01T13:29:36.941-07:00@steshaw. Neither example is ideal but unfoldRigh...@steshaw. Neither example is ideal but unfoldRight could be rewritten to be tail recursive.Anonymoushttps://www.blogger.com/profile/07600430363435495915noreply@blogger.comtag:blogger.com,1999:blog-5089773352404981635.post-56168434557711775172011-06-01T13:28:29.215-07:002011-06-01T13:28:29.215-07:00The name is ambiguous. When I wrote this post I ...The name is ambiguous. When I wrote this post I viewed it as the resulting list flows left to right with regard to the elements coming from the function in the same way a stream flows. <br /><br />But I certainly understand where you are coming from and if I wrote it now I might have written it in that fashion as well.Anonymoushttps://www.blogger.com/profile/07600430363435495915noreply@blogger.comtag:blogger.com,1999:blog-5089773352404981635.post-50705384458332779532011-06-01T12:05:11.052-07:002011-06-01T12:05:11.052-07:00Shouldn't unfoldRight construct the list from ...Shouldn't unfoldRight construct the list from right to left? They seem reversed to me.Danielhttps://www.blogger.com/profile/07505997833685327219noreply@blogger.comtag:blogger.com,1999:blog-5089773352404981635.post-62485748461964404162009-12-19T22:25:10.281-08:002009-12-19T22:25:10.281-08:00unfoldLeft looks to be implemented without adding ...unfoldLeft looks to be implemented without adding an element to the end of a list. It looks pretty efficient. unfoldRight can blow the stackAnonymousnoreply@blogger.com