Real-world applications of zygohistomorphic prepromorphisms

Sharon Curtis and Shin-Cheng Mu have a Functional Pearl using zygomorphisms to find maximally dense segments (a generalization of maximum segment sums). Zygomorphisms are seemingly a good fit for sliding window problems once you are accustomed to them. http://www.iis.sinica.edu.tw/~scm/2010/functional-pearl-maximally-dense-segments/ I’d nominate the authors for extra credit as they’ve avoided the use of the fixed-point Mu … Read more

What’s the status of multicore programming in Haskell?

In the 2009-2012 period, the following things have happened: 2012: From 2012, the parallel Haskell status updates began appearing in the Parallel Haskell Digest. 2011: Parallel and Concurrent Programming in Haskell, a tutorial. version 1.1 released by Simon Marlow Haskell and parallelism, mentioned in an article in the Economist magazine, Jun 2nd 2011. Parallel tree … Read more

Why is there “data” and “newtype” in Haskell? [duplicate]

Both newtype and the single-constructor data introduce a single value constructor, but the value constructor introduced by newtype is strict and the value constructor introduced by data is lazy. So if you have data D = D Int newtype N = N Int Then N undefined is equivalent to undefined and causes an error when … Read more

How to split a string in Haskell?

Remember that you can look up the definition of Prelude functions! http://www.haskell.org/onlinereport/standard-prelude.html Looking there, the definition of words is, words :: String -> [String] words s = case dropWhile Char.isSpace s of “” -> [] s’ -> w : words s” where (w, s”) = break Char.isSpace s’ So, change it for a function that … Read more