我被问在这给我留下了很困惑一类这个问题,我们提出下列要求:什么类型在Haskell意味着
对于波纹管式声明:
ranPositions :: Image -> Dims -> [Point]
getBlockSums :: Image -> Dims -> [Point] -> [BlockSum]
i :: Image
d :: Dims
什么以下类型? 是不是上面的?!
ranPositions i d
getBlockSums i d
所以,我回答是这样的:
type ranPositions = Array Point Int, (Int, Int)
type getBlockSums = Array Point Int, (Int, Int)
// Because (this was given)
type Image = Array Point Int
type Dims = (Int, Int)
除了是错误的,这个问题困惑了我,因为我认为一个函数的类型是什么的::
后声明,所以它有已经给了,不是吗?
我可以做一些解释,我会很感激任何帮助。
请查看HaskellWiki中的[Currying](http://www.haskell.org/haskellwiki/Currying) – 2011-04-07 13:16:05