ReactiveX/RxJava — pull request #1883 by benjchristensen (2014-11-15 14:31:10+00:00)
Title: Fix Scan/Reduce/Collect Lambda Ambiguity

This fixes the Java 8 lambda ambiguity between the overloads: https://github.com/ReactiveX/RxJava/issues/1881

This is a breaking change for anyone using `scan`, `reduce`, `collect` with an initial value.

There are two approaches to adapting.

If the initial value is the same type such as this:

```java
stream.scan(1, Func2)
```

then you can use `startWith`:

```java
stream.startWith(1).scan(Func2)
```

If it is a different type then a seed factory is needed:

```java
stream.scan(Func0

, Func2< List, Integer, List >)
```

In Java 8 this would change from this:

```java
stream.scan(new ArrayList(), (list, item) -> {
list.add(item);
return list;
});
```

to this:

```java
stream.scan(() -> new ArrayList(), (list, item) -> {
list.add(item);
return list;
});
```

The same change happens in `reduce` and `collect`.