Talk:Haskell/Overview

How do you do things that require state? Like simulations? 82.169.255.79 (talk) 19:04, 24 June 2009 (UTC)

The Quicksort alogrithm's intent can be elegantly expressed in Haskell with the help of list comprehensions: Note that because of excessive copying and concatenation of lists this code can be rather slow, depending on the implementation. But more importantly, the above code is not in-place, which is an essential characteristic of genuine quicksort. Haskell's data is immutable though, but at least the list's double-traversal can be eliminated with to make it a little bit less hideously inefficient. WillNess (talk) 17:23, 21 May 2010 (UTC)


 * Just hazily wondering... but is it really worth it to optimize the sample implementations in this "Overview" page at the cost of clarity and elegance, given that its main point is demonstrating to the readers in a clear way what the language looks like? --Duplode (talk) 17:00, 23 May 2010 (UTC)


 * Don't know. That's why I put it here, hoping for someone wiser than me to make a judgment. It's just that I've seen the list-comprehension variant above mentioned as an example of how Haskell makes it very easy to write terribly inefficient code. I was also hoping that the simplified code I've put on the page itself be sufficiently clear and easy for a beginner to read. The original code makes double traverse of the list structure for no other reason than to be visually appealing. Maybe that's exactly a kind of example that beginners ought not to see at all. Would appreciate any feedback. WillNess (talk) 11:30, 30 June 2010 (UTC)


 * awwghh, how embarrassing. The function  is of course, Data.List.partition, reinvented. WillNess (discuss • contribs) 08:23, 17 May 2011 (UTC)

Putting back the original concise  to the content page. The one-traversal code itself had a space leak anyway (explained in Bird's IntroFunPro, pg. 248): WillNess (talk) 20:16, 25 August 2010 (UTC)

Just for reference, with primes wheel optimization, double primes feed for drastically reduced memory consumption, and a better adjusted folding tree structure, the real primes code is:

More at Prime numbers page on haskellwiki. WillNess (discuss • contribs) 19:19, 24 March 2011 (UTC)

The external link to Hope is broken
At the end of the page is a link to a content management system Hope (http://hope.bringert.net/about). Either the server of Hope is broken, or the project is dead. I tried to google it, but the only link I found leads to the same URL. Any ideas?