Determine, and emit, the maximum-valued item emitted by an Observable.
observable := rxgo.Just(2, 5, 1, 6, 3, 4)().
Max(func(i1 interface{}, i2 interface{}) int {
return i1.(int) - i2.(int)
})
Output:
6
Determine, and emit, the maximum-valued item emitted by an Observable.
observable := rxgo.Just(2, 5, 1, 6, 3, 4)().
Max(func(i1 interface{}, i2 interface{}) int {
return i1.(int) - i2.(int)
})
Output:
6