-5
first :: (a,b,c) -> a
first (x, _, _) = x

second :: (a,b,c) -> b
second (_,y,_) = y

third:: (a,b,c)-> c
third (_,_,z) => z

我从这段代码中收到错误消息。

"parse error on input `=>'
"

我看不出任何理由。谁能帮我指出来?谢谢。

4

1 回答 1

4

您使用了错误的词位:在 first 和 second=和 third =>。将其替换为=

于 2012-05-05T08:07:19.857 回答