fork download
  1. let f = List.fold (fun x (s,c) -> (s+x, c+1)) (0,0)
  2. printfn "%A" (f [3;4;5])
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/home/voIKHO/prog.fs(2,18): error FS0001: This expression was expected to have type
    'a * int    
but here has type
    int    

/home/voIKHO/prog.fs(2,20): error FS0001: This expression was expected to have type
    'a * int    
but here has type
    int    

/home/voIKHO/prog.fs(2,22): error FS0001: This expression was expected to have type
    'a * int    
but here has type
    int    

/home/voIKHO/prog.fs(1,37): error FS0071: Type constraint mismatch when applying the default type 'int' for a type inference variable. The type 'int * int' does not match the type 'int' Consider adding further type constraints
stdout
Standard output is empty