fork download
  1.  
  2.  
  3. fun :: [Integer] -> Integer
  4.  
  5. fun l = check 0 l
  6. check n l = if l == []
  7. then n
  8. else let x = head l
  9. xs = tail l
  10. in if (x % 3)
  11. then check (n+x) xs
  12. else check n xs
  13.  
  14. main = print(fun [1..5])
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
[1 of 1] Compiling Main             ( prog.hs, prog.o )

prog.hs:10:34: error:
    Variable not in scope: (%) :: t -> Integer -> Bool
stdout
Standard output is empty