eigenein/cloudy — Issue #42: Reduce with zero or one element is handled incorrectly
Author: eigenein
Created: 2012-02-21 00:12:03+00:00
State: open
Labels: Bug

E.g. there is:

public T Reduce(int tag, T value, ReduceOperation operation, IEnumerable targets)
{
return ReduceHelper.Reduce(value, Reduce(tag, operation, targets), operation);
}

a potential problem if `operation` is `Multiply` and `targets` contains no elements: `value` will be multiplied by `0`, but just the `value` should be returned!

Review all similar cases among all the `Reduce` methods. Possibly, write unit tests (how?).