我一直得到"错误:输入解析错误'|' "有人可以告诉我为什么吗?我已经重写了它,以确保所有正确的空格都是我的代码:
mylast :: (Eq a) => [a] -> [a] mylast [] = [] mylast (x:xs) | xs == [] : x | otherwise = mylast xs
haskell
haskell ×1