ZVON > References > Haskell reference
| Indexes | Syntax | >> Prelude << | Ratio | Complex | Numeric | Ix | Array | List | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random

Module: Prelude
Function: repeat
Type: a -> [a]
Description: it creates an infinite list where all items are the first argument
Related: cycle, iterate, replicate, take

Example 1

Input: take 4 (repeat 3)

Output: [3,3,3,3]

Example 2

Input: take 6 (repeat 'A')

Output: "AAAAAA"

Example 3

Input: take 6 (repeat "A")

Output: ["A","A","A","A","A","A"]