[Haskell-cafe] where to put handy functions?
chad.scherrer at gmail.com
Fri Aug 10 11:38:31 EDT 2007
Hmm, this would make a good QuickCheck property. I wonder, is listify
a contravariant functor? Fun to work through the details of that some
time, I think.
On 8/10/07, Brent Yorgey <byorgey at gmail.com> wrote:
> Amusingly, extract is intimately related to function composition. Suppose we
> listify :: (Int -> Int) -> [Int]
> listify = flip map [0..]
> Then if f, g :: Int -> Int, and f is monotonically increasing, we have the
> (listify f) `extract` (listify g) = listify (g . f)
> This randomly occurred to me as I was falling asleep last night and I
> thought I would share. =)
More information about the Haskell-Cafe