android-components / mozilla.components.support.base.observer / ConsumableStream / consumeNext

# consumeNext

`@Synchronized fun consumeNext(consumer: (value: T) -> Boolean): Boolean` (source)

Invokes the given lambda with the next consumable value and marks the value as consumed if the lambda returns true.

### Parameters

`consumer` - a lambda accepting a consumable value.

Return
true if the consumable was consumed, otherwise false.