Haskell beginner trying to find the syntax errors

There are many errors in the code:

N = a ’div’ length xs
    where
      a = 10
     xs = [1,2,3,4,5]
  • div needs to be enclosed in backquotes.
  • xs in line 4 needs to be aligned with a in order to say that it is part of the same code block
  • Function names in Haskell must start with a lower case letter

There are three problems here:

  1. you use an apostrophe [wiki] instead of backticks ` [wiki];
  2. you need to indent a and xs on the same column; and
  3. the name of functions starts with a lowercase, so n instead of N:
--    🖟   🖟 backticks
n = a `div` length xs
    where
      a = 10
      xs = [1,2,3,4,5]  -- 🖘 same indentation as a