:: Ord a => [a] -> f a
Coerce while preserving the type index.
Given a
Lift n constraint in a signature carried by
m,
sendM promotes arbitrary actions of type
n
a to
m a. It is spiritually similar to
lift
from the
MonadTrans typeclass.
Pick a random element of the list.
O(n) Convert a list to a vector
Create vector form list. Will throw error if list is shorter than
resulting vector.
Create vector form list. Will throw error if list has different length
from resulting vector.
maximum returns the maximum value from a list, which must be
non-empty, finite, and of an ordered type. It is a special case of
maximumBy, which allows the programmer to supply their own
comparison function. Empty lists throw an
EmptyListException.
minimum returns the maximum value from a list, which must be
non-empty, finite, and of an ordered type. It is a special case of
minimumBy, which allows the programmer to supply their own
comparison function. Empty lists throw an
EmptyListException.
Convert a prim monad to another prim monad.
The net effect is that it coerce the state repr to another, so the
runtime representation should be the same, otherwise hilary ensues.
O(n) Convert different vector types
Tail of vector.
Examples:
>>> import Data.Complex
>>> tail (1,2,3) :: Complex Double
2.0 :+ 3.0
Convert between different vector types
O(1) First element of a vector in a monad. See
indexM
for an explanation of why this is useful.
O(1) Last element of a vector in a monad. See
indexM for
an explanation of why this is useful.
O(1) First element in a monad without checking for empty
vectors. See
indexM for an explanation of why this is useful.
O(1) Last element in a monad without checking for empty
vectors. See
indexM for an explanation of why this is useful.
Create vector form list. Will return Nothing if list has
different length from resulting vector.
Create vector from
Foldable data type. Will return
Nothing if data type different number of elements that
resulting vector.