fork download
  1. insideSum :: (Float, Float) -> Float
  2. insideSum (a,b) = a + b
  3.  
  4. sumTuple :: [(Float, Float)] -> Float
  5. sumTuple [] = 0
  6. sumTuple [x] = insideSum head x + sumTuple tail x
  7.  
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:1:0: The function `main' is not defined in module `Main'

prog.hs:6:25:
    Couldn't match expected type `(Float, Float)'
           against inferred type `[a] -> a'
    In the first argument of `insideSum', namely `head'
    In the first argument of `(+)', namely `insideSum head x'
    In the expression: insideSum head x + sumTuple tail x
stdout
Standard output is empty