
10 Aug
2007
10 Aug
'07
11:38 a.m.
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.
Chad
On 8/10/07, Brent Yorgey
Amusingly, extract is intimately related to function composition. Suppose we have
listify :: (Int -> Int) -> [Int] listify = flip map [0..]
Then if f, g :: Int -> Int, and f is monotonically increasing, we have the identity
(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. =)
-Brent