【发布时间】:2014-09-08 04:54:28
【问题描述】:
我有一个使用点运算符的函数。现在我想写没有点。我该怎么做?
all p = and . map p
是这样吗?
all p = and (map p)
我收到以下错误:
4.hs:8:13:
Couldn't match expected type `[Bool]'
with actual type `[a0] -> [b0]'
In the return type of a call of `map'
Probable cause: `map' is applied to too few arguments
In the first argument of `and', namely `(map p)'
In the expression: and (map p)
【问题讨论】:
标签: haskell operators dot-operator