In this tutorial I would like to talk all about continuations, to attempt to demystify this rather simple concept somewhat. For it’s not so much that continuations are difficult, but that the ways in which they’re used can get complex pretty fast. In essence, a continuation is a function which represents the next block of code to be executed. Take [...]
The following is the first in a series of articles I hope to write as a gentle introduction to Edward Kmett’s excellent lens library.
> import Control.Lens -- HIDE > import Control.Arrow
Control.Lens provides a composable way to access and modify sub-parts of data structures (where by modify I mean: [...]
I have found that arrows in Haskell are far simpler than they might appear based on the literature. They are simply abstractions of functions. To see how this is practically useful, consider that you have a bunch of functions you want to compose, where some of them are pure and some are monadic. For example, f :: a -> b, [...]
To show just how significant parallelized algorithms can be, today I discovered pxz, a parallelized version of the xz compression utility, which I use constantly. The proof is in the numbers: [...]
Today I finally succeeded at getting a fully local version of Hoogle running on my machine, with filesystem links for all packages that I have installed, and remote links for those I don’t. Since this was definitely a non-trivial exercise, I wanted to capture the knowledge here for anyone else trying to do the same. First, let me mention that [...]
The fix combinator is a higher order function that can turn any function into a potentially recursive one. It can be a bit difficult to wrap your head around, since neither the definition nor the documentation is very clear on what you might use it for. However, I’ve found one handy use case: creating recursive lambdas. Say you have a [...]