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: | enumFromThen |
Type: | Enum a => a -> a -> [a] |
Class: | Enum |
Description: | returns an array of members of an enumeration starting with the first argument and with the distances 0,1,2,... * distance from the first argument to the second one, it is equvalent to syntax. |
Related: | enumFrom, enumFromThenTo, enumFromTo, fromEnum, pred, succ, toEnum |
Input: take 10 (enumFromThen 'A' 'E')
Output: "AEIMQUY]ae"
Input: take 10 (enumFromThen 4 7)
Output: [4,7,10,13,16,19,22,25,28,31]
Program source: data XXX = AA|BB|CC|DD|EE|FF|GG deriving (Enum, Show)
Input: enumFromThen AA CC
Output: [AA,CC,EE,GG]