GHCi에서이 정의가 실패하는 이유는 무엇입니까?왜이 간단한 산술 함수는 타입 체크를하지 않습니까?
No instance for (Num (a0 -> a0))
arising from a use of `+'
Possible fix: add an instance declaration for (Num (a0 -> a0))
In the expression: (* 2) + 1
In an equation for `f': f = (* 2) + 1
와
let f = (*2)+1
방법은 다음과 다른 것이 무엇입니까?
let f x = x*2+1
'(* 2)'는 함수입니다. 'x * 2'는 숫자입니다. –