:: a -> [a] -package:happstack-server

repeat x is an infinite list, with x the value of every element.

Examples

>>> take 10 $ repeat 17
[17,17,17,17,17,17,17,17,17, 17]
>>> repeat undefined
[*** Exception: Prelude.undefined
Construct a list from a single element.

Examples

>>> singleton True
[True]
>>> singleton [1, 2, 3]
[[1,2,3]]
>>> singleton 'c'
"c"
Returns no shrinking alternatives.
repeat x is an infinite list, with x the value of every element.
>>> repeat 17
[17,17,17,17,17,17,17,17,17...
repeat x is an infinite list, with x the value of every element.
Produce singleton list.
>>> singleton True
[True]
repeat x is an infinite list, with x the value of every element.
>>> take 20 $ repeat 17
[17,17,17,17,17,17,17,17,17...
Give a telling name to the electric monkey.
An implementation of toList for Projectable fixed-points of XNor.
Generalized version of evaluate.
Lift a value into the Structure.

Examples

>>> pure 1 :: Maybe Int
Just 1
>>> pure 'z' :: [Char]
"z"
>>> pure (pure ":D") :: Maybe [String]
Just [":D"]
Lift a value.