[Haskell-cafe] How to understand the fmap here ?
z_axis
z_axis at 163.com
Tue May 5 05:27:16 EDT 2009
The following code snippets is from xmonad:
-- Given a window, find the screen it is located on, and compute
-- the geometry of that window wrt. that screen.
floatLocation :: Window -> X (ScreenId, W.RationalRect)
--.......
rr <- snd `fmap` floatLocation w
Prelude> :i fmap
class Functor f where fmap :: (a -> b) -> f a -> f b
It seems it is different from the definition of fmap ?
sincerely!
2009-05-05
z_axis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090505/41f80c4d/attachment.htm
More information about the Haskell-Cafe
mailing list