extrema

extrema(itr)

Compute both the minimum and maximum element in a single pass, and return them as a 2-tuple.

Examples

julia> extrema([1,2,3])
(1,3)
julia> extrema([1,2,3,3])
(1,3)

See Also

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field
Details

Checking you are not a robot: