tag:blogger.com,1999:blog-33049444.post7123783646926109048..comments2023-08-13T06:12:47.931-04:00Comments on Bloggy Badger: A whirlwind tour of Haskell, via Advent of code solutionsgelisamhttp://www.blogger.com/profile/10619127479176568208noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-33049444.post-41887972686825869212015-12-10T11:54:49.154-05:002015-12-10T11:54:49.154-05:00oh, of course, i just banged it into Haskell for M...oh, of course, i just banged it into Haskell for Mac to play with and forgot that it's still on GHC 7.8 (i'm a big fan of the FTP change too). cheers, AAndrew Condonhttps://www.blogger.com/profile/15405212917058794058noreply@blogger.comtag:blogger.com,1999:blog-33049444.post-45424533318411605402015-12-10T08:35:50.318-05:002015-12-10T08:35:50.318-05:00Thanks!
In ghc 7.10, length has been generalized ...Thanks!<br /><br />In ghc 7.10, length has been generalized to work on any Foldable, so I don't need to convert to a list before calling it. It was a big change called "FTP" or "Burning Bridges" proposal, and it caused a lot of fuss when it got in because not everybody agreed it was a good idea. I think it is!gelisamhttps://www.blogger.com/profile/10619127479176568208noreply@blogger.comtag:blogger.com,1999:blog-33049444.post-87726200695267501412015-12-10T03:30:06.093-05:002015-12-10T03:30:06.093-05:00This is a super article, i really like the contras...This is a super article, i really like the contrasting X vs X.5 solutions, i can totally use those in explaining Haskell's advantages to people coming from an imperative programming background. <br /><br />One comment - i think your 3.5 solution is missing a "Set.toList" before you take the length? or else use Set.size? Andrew Condonhttps://www.blogger.com/profile/15405212917058794058noreply@blogger.com