Determine whether all items emitted by an Observable meet some criteria.
observable := rxgo.Just(1, 2, 3, 4)().
All(func(i interface{}) bool {
// Check all items are less than 10
return i.(int) < 10
})
Output:
true
Determine whether all items emitted by an Observable meet some criteria.
observable := rxgo.Just(1, 2, 3, 4)().
All(func(i interface{}) bool {
// Check all items are less than 10
return i.(int) < 10
})
Output:
true