【发布时间】:2010-03-19 21:05:55
【问题描述】:
我有这个,但我遇到了一个错误:
-- test if a list contains exactly three characters
test :: [Char] -> Bool
test xs | [_ , _ , _] = True
| otherwise = False
【问题讨论】:
-
我不得不说,比起
[_ , _ , _],我更喜欢[_, _, _]。 -
你遇到了什么错误?
-
这里的答案比我要求的要多。谢谢。