N = a ’div’ length xs
where
a = 10
xs = [1,2,3,4,5]
I am currently learning Haskell and I got a task in which I have to find the syntax errors and try to fix them. I can see div
needs to be enclosed with backquotes. However, I am not sure if there are any other errors?
CodePudding user response:
There are three problems here:
- you use an apostrophe
’
[wiki] instead of backticks`
[wiki]; - you need to indent
a
andxs
on the same column; and - the name of functions starts with a lowercase, so
n
instead ofN
:
--