【发布时间】:2014-06-21 20:32:10
【问题描述】:
我刚读了《Learn you a haskell》,很喜欢我所看到的内容,因此开始使用该语言。我在网上找到了一些练习,我一直在努力进行类型检查。
我的问题是我不明白下面的类型签名 Misty ((->) t 中的 (->) 是什么。
class Misty m where
banana :: (a -> m b) -> m a -> m b
unicorn :: a -> m a
--- what does this mean?
instance Misty ((->) t) where
banana = error "todo"
unicorn = error "todo"
谢谢!
【问题讨论】:
-
只需将
(m a)替换为(t -> a)