Min Operator

Base.minFunction
min(; from = nothing)

Creates a min operator, which emits a single item: the item with the smallest value.

Arguments

  • from: optional initial minimal value, if nothing first item from the source will be used as initial instead

Producing

Stream of type <: Subscribable{Union{L, Nothing}} where L refers to type of source stream

Examples

using Rocket

source = from([ i for i in 1:42 ])
subscribe!(source |> min(), logger())
;

# output

[LogActor] Data: 1
[LogActor] Completed

See also: AbstractOperator, InferableOperator, ProxyObservable, logger

source

Description

The min operator operates on an Observable of similar objects. When source Observable completes, it emits the item with the smallest value.

See also

Operators