fork download
  1. main = do
  2. foldl ( \ a b -> 2*a + b) 0 [1,0,0,1,0]
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
compilation info
[1 of 1] Compiling Main             ( prog.hs, prog.o )

prog.hs:2:26:
    No instance for (Num (IO t))
      arising from the literal `2' at prog.hs:2:26
    Possible fix: add an instance declaration for (Num (IO t))
    In the first argument of `(*)', namely `2'
    In the first argument of `(+)', namely `2 * a'
    In the expression: 2 * a + b
stdout
Standard output is empty