【发布时间】:2020-06-12 15:20:43
【问题描述】:
takeEveryNth :: [Int] -> Int -> [Int]
takeEveryNth g destination
| [] destination == []
| otherwise = [g !! destination] ++ takeEveryNth (drop (destination+1) g) destination
我不断收到此代码第 4 行标题中的错误消息(| 否则 =...) 我已尝试更改缩进,但不知道为什么会出现此错误
【问题讨论】:
-
[] destination毫无意义。此外,它是... = ...,而不是... == ...
标签: haskell