(head.group) "1234"
有效。
head.group "1234"
我收到错误:
<interactive>:8:6:
Couldn't match expected type `a0 -> [c0]'
with actual type `[[Char]]'
In the return type of a call of `group'
Probable cause: `group' is applied to too many arguments
In the second argument of `(.)', namely `group "1234"'
In the expression: head . group "1234"
我认为(head.group)与head.group相同,为什么(head.group)工作,head.group没有。
答案 0 :(得分:4)
由于
(head . group) "1234" = f "12345"
where
f = head . group
,而
head . group "1234" = head . (group "1234")
= head . f
where
f = group "1234"
但group "1234"
不是一个功能。请记住,功能应用程序比运营商更强大。