
30 Apr
2009
30 Apr
'09
4:11 p.m.
"Brandon S. Allbery KF8NH"
How about map pure. I do like the robot monkey though :)
What is 'map pure'?
It uses the applicative functor (Control.Applicative) instance for lists, just as "fmap return" uses the monad instance. Both work out to the same thing.
In fact, I'd choose a combination of both, split = fmap pure which seems to be most elegant to me. It's more general than both of them. I just took 'return' instead of 'pure', because you don't need any extra modules for that. Greets, Ertugrul. -- nightmare = unsafePerformIO (getWrongWife >>= sex) http://blog.ertes.de/