:: a -> [a]

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.
Respond with 200 OK.
main = simpleHTTP nullConf $ ok "Everything is OK"
Respond with 204 No Content A 204 No Content response may not contain a message-body. If you try to supply one, it will be dutifully ignored.
main = simpleHTTP nullConf $ noContent "This will be ignored."
Respond with 500 Internal Server Error.
main = simpleHTTP nullConf $ internalServerError "Sorry, there was an internal server error."
Responds with 502 Bad Gateway.
main = simpleHTTP nullConf $ badGateway "Bad Gateway."
Respond with 400 Bad Request.
main = simpleHTTP nullConf $ badRequest "Bad Request."
Respond with 401 Unauthorized.
main = simpleHTTP nullConf $ unauthorized "You are not authorized."
Respond with 403 Forbidden.
main = simpleHTTP nullConf $ forbidden "Sorry, it is forbidden."
Respond with 404 Not Found.
main = simpleHTTP nullConf $ notFound "What you are looking for has not been found."
Respond with 413 Request Entity Too Large.
main = simpleHTTP nullConf $ requestEntityTooLarge "That's too big for me to handle."
Lift a value into the Structure.

Examples

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