这是我的代码:
-- combine lists with binary operation
clwbo :: (Num a, Num b, Num c) => (a -> b -> c) -> [a] -> [b] -> [c]
clwbo fps lista listb
|length lista /= length listb = []
|length lista ==length listb = case lista listb of
[] [] -> []
x:xs y:ys -> [fps x y] ++ clwbo fps xs ys
otherwise -> error "get off"
这是来自终端的错误消息:
test.hs:8:42: Parse error in pattern: xs
Failed, modules loaded: none.
有人喜欢告诉我我的代码有什么问题吗?