The `filtermap` functional below allows to perform the standard `map` and `filter` operations in one go. The mapping function has to return a `Maybe` monad, and values of `Nothing` are filtered out.
Category Archives: Haskell
I had originally started these problems from #10 (Run-length encoding). I went back and did 1-8 for completeness.
Problem 10 of the famous 99 Problems. I got 99 problems, but a Lisp ain’t one.
`pam` is some sort of reverse `map` (hence the name). While `map` applies a function to a list of arguments, `pam` applies a list of functions to the same argument.
Easy if you know how… ;)
HSH is a cool haskell library that allows you to leverage your shell scripting prowess in haskell programs. In this simple broadcatcher, I use curl for http get, and other standard unix tools for tracking history (so we don’t get the same file twice). The feed parsing and filtering is done in haskell using the [...]
These functions return all points (pairs or triples of coordinates) within a given rectangle or box. “pam“ is the reverse map function which was defined [here](http://snipplr.com/view/18351/reverse-map/).