I'm trying to run this code:
let coins = [50, 25, 10, 5, 2,1]
let candidate = 11
calculate :: [Int]
calculate = [ calculate (x+candidate) | x <- coins, x > candidate]
I've read some tutorials, and it worked out ok. I'm trying to solve some small problems to give-me a feel of the language. But I'm stuck at this.
test.hs:3:0: parse error (possibly incorrect indentation)
Can anyone tell me why? I've started with haskell today so please go easy on the explanations.
I've tried to run it like:
runghc test.hs
ghc test.hs
but with:
ghci < test.hs
it gives this one:
<interactive>:1:10: parse error on input `='
Thanks