我经历these Haskell的“中间”的练习,我做了以下情况:仿函数实例声明中的箭头运算符?
class Fluffy f where
furry :: (a -> b) -> f a -> f b
instance Fluffy [] where
furry f [] = []
instance Fluffy Maybe where
furry f (Just e) = Just (f e)
furry f (Nothing) = Nothing
然而,第三个问题语法已难倒我:
instance Fluffy ((->) t) where
...
我读过并阅读this的答案,该答案解释了在Monad实例中(->)
的作用。不过,我不太明白(->)
如何在Functors的情况下工作?