Source

OCaml Map Reduce Project / apps / page_rank / reducer.ml

Full commit
1
2
3
let (_, values) = Program.get_input() in
let sum = List.fold_left (fun acc v -> acc +. (float_of_string v)) 0. values in
    Program.set_output [string_of_float sum]