minimum -package:base

O(n) minimum returns the minimum value from a ByteString An exception will be thrown in the case of an empty ByteString.
minimum returns the minimum value from a ByteString
O(n) minimum returns the minimum value from a ByteString
O(n) minimum returns the minimum value from a Text, which must be non-empty.
O(n) minimum returns the minimum value from a Text, which must be non-empty. Properties
minimum . stream = minimum
O(n) Yield the minimum element of the vector. The vector may not be empty. In case of a tie, the first occurrence wins.

Examples

>>> import qualified Data.Vector as V

>>> V.minimum $ V.fromList [2, 1]
1

>>> import Data.Semigroup

>>> V.minimum $ V.fromList [Arg 2 'a', Arg 1 'b']
Arg 1 'b'

>>> V.minimum $ V.fromList [Arg 1 'a', Arg 1 'b']
Arg 1 'a'
O(n) Yield the minimum element of the vector. The vector may not be empty. In case of a tie, the first occurrence wins.

Examples

>>> import qualified Data.Vector.Strict as V

>>> V.minimum $ V.fromList [2, 1]
1

>>> import Data.Semigroup

>>> V.minimum $ V.fromList [Arg 2 'a', Arg 1 'b']
Arg 1 'b'

>>> V.minimum $ V.fromList [Arg 1 'a', Arg 1 'b']
Arg 1 'a'
O(n) Yield the minimum element of the vector. The vector may not be empty. In case of a tie, the first occurrence wins.

Examples

>>> import qualified Data.Vector.Primitive as VP

>>> VP.minimum $ VP.fromList [2, 1 :: Int]
1
O(n) Yield the minimum element of the vector. The vector may not be empty. In case of a tie, the first occurrence wins.

Examples

>>> import qualified Data.Vector.Storable as VS

>>> VS.minimum $ VS.fromList [2, 1 :: Int]
1
O(n) Yield the minimum element of the vector. The vector may not be empty. In case of a tie, the first occurrence wins.

Examples

>>> import qualified Data.Vector.Unboxed as VU

>>> VU.minimum $ VU.fromList [2, 1 :: Int]
1

>>> import Data.Semigroup

>>> VU.minimum $ VU.fromList [Arg 2 'a', Arg (1 :: Int) 'b']
Arg 1 'b'

>>> VU.minimum $ VU.fromList [Arg 1 'a', Arg (1 :: Int) 'b']
Arg 1 'a'
Get the smallest value in the stream, if present. Subject to fusion
The least element of a non-empty structure. This function is non-total and will raise a runtime exception if the structure happens to be empty. A structure that supports random access and maintains its elements in order should provide a specialised implementation to return the minimum in faster than linear time.

Examples

Basic usage:
>>> minimum [1..10]
1
>>> minimum []
*** Exception: Prelude.minimum: empty list
>>> minimum Nothing
*** Exception: minimum: empty structure
WARNING: This function is partial for possibly-empty structures like lists.
Find the minimum element of a Producer
argmin
Computes the minimum element
Computes the minimum byte
Computes the minimum element
Computes the minimum character
minimum stream returns the greatest element in stream minimum consumes the entire stream.
ghci> is <- Streams.fromList [1, 2, 3]
ghci> Streams.minimum is
1
ghci> Streams.read is    -- The stream is now empty
Nothing
O(n) minimum returns the minimum value from a ByteString
O(n) minimum returns the minimum value from a ByteString This function will fuse. An exception will be thrown in the case of an empty ByteString.
The least element of a non-empty structure.
O(n) minimum returns the minimum value from a Text, which must be non-empty. Subject to fusion.