ZVON > References > Haskell reference |
Intro / Search / ZVON |
| 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 |
Input: take 4 (repeat 3)
Output: [3,3,3,3]
Input: take 6 (repeat 'A')
Output: "AAAAAA"
Input: take 6 (repeat "A")
Output: ["A","A","A","A","A","A"]