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:xs] = insideSum x + sumTuple xs
  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:10:
    Couldn't match expected type `(Float, Float)'
           against inferred type `[a]'
    In the pattern: x : xs
    In the pattern: [x : xs]
    In the definition of `sumTuple':
        sumTuple [x : xs] = insideSum x + sumTuple xs
stdout
Standard output is empty