내 코드입니다 :고차 함수, '|'입력에 대한 구문 분석 오류 여기
select_where_true :: (Double -> Bool) -> [Double] -> [Double]
select_where_true is_neg [a] = case [a] of
[] -> []
x:xs -> is_neg x
|(is_neg x) == False = []
|(is_neg x) == True = x ++ (select_where_true is_neg xs)
is_neg :: Double -> Bool
is_neg x = x < 0
그리고 여기에 오류 메시지입니다 :
[1 of 1] Compiling Main (test.hs, interpreted)
test.hs:5:18: parse error on input `|'
Failed, modules loaded: none.
사람이 내 코드에 문제가 있는지 말해 좋아?
나에게 좋은 조언을 해줄 수있는 사람에게 감사드립니다.
들으 u는 너무 많이, 난 유 말한 다음 그것을 해결했습니다. – libra