Snippets

As of March 2020, School of Haskell has been switched to read-only mode.

This is a holding bin for short interactive code-snippets that aren't worth a whole tutorial.

  • The free theorem for fmap 16 Feb 2015Edward Kmett

    Given fmap id = id we can show fmap f . fmap g = fmap (f . g) follows via the free theorem.
  • Once 3 Sep 2013Edward Kmett

    DeepSeq only the first time you are asked.
  • Mandelbrot 3 Sep 2013Edward Kmett

    This snippet demonstrates how to use the PNG generator from part 2 of my series on cellular automata to render something a bit different.