Skip to content

Instantly share code, notes, and snippets.

@ayoshi
ayoshi / hsinstall
Created October 22, 2015 14:54
Install haskell with stack, including support for emacs + IHaskell
stack --resolver nightly-2015-10-22 install stylish-haskell \
hasktags hlint structured-haskell-mode ghc-mod pointfree base-prelude \
mtl-prelude pretty-show sr-extra ipprint ghci-pretty ihaskell
#! /usr/bin/python
"""Implementation of the arrow abstraction for functions.
Abstracting functions with Arrows has advantages. Arrows make it very easy to
compose functions (by simply 'multiplying' them with the `*` operator). The
order in which the arrows are written match the order of the computations,
making long pipelines easy to work with. Arrows also provide mechanisms for
creating and merging branches, which helps when a value needs to be consumed by
several functions, or when a function needs values from several sources. Arrows
can also support conditional application, selecting which of two functions f and