如果小于 2,则删除列表的前 n 个元素。错误说“没有使用'print'引起的(showa0)实例......”我从来不理解Haskell错误消息
func [] _ _ = []
func (x:xs) counter n
| x > 2 && counter < n = x :func xs counter limit
| otherwise = func xs (counter+1) limit
main = do
print $ func [3,1,4,2,1] 0 2
-- expectet output is [3,4,1]