From: Florian H. <ha...@bi...> - 2005-06-07 07:33:46
|
Nicolas Cannasse wrote: > After a second though I think it's little overweighted to make the user > specify a merge function. Why not simply specify that in such cases, the > item of the first map is selected ? If I wanted to implement something like googles map-reduce-thingy in ocaml (which may be the easiest way to get anything out of a multicore processor), I might just want to marshal the results to send them around and use this merge function as the reduce operation. So if you don't want to force the user to select a merge function, at least don't force him to reimplement union to be able to do so, i. e. make it let union ?(reduce = fun key v1 v2 -> v1) map1 map2 = ... I strongly support the exception proposal for unwanted values. Yours, Florian |