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: | cycle |
Type: | [a] -> [a] |
Description: | it creates a circular list from a finite one |
Related: | iterate, repeat, replicate, take |
Input: take 10 (cycle [1,2,3])
Output: [1,2,3,1,2,3,1,2,3,1]
Input: take 10 (cycle "ABC")
Output: "ABCABCABCA"