This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |