[Haskell-cafe] How to understand the fmap here ?
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 ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe