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: enumFromThenTo
Type: Enum a => a -> a -> a -> [a]
Class: Enum
Description: returns an array of members of an enumeration starting with the first argument and finishing with the third one in distances determined by the second one, it is equvalent to syntax.
Related: enumFrom, enumFromThen, enumFromTo, fromEnum, pred, succ, toEnum

Example 1

Input: enumFromThenTo 'A' 'C' 'M'

Output: "ACEGIKM"

Example 2

Input: enumFromThenTo 'A' 'C' 'N'

Output: "ACEGIKM"

Example 3

Input: enumFromThenTo 3 6 11

Output: [3,6,9]

Example 4
Program source: 
data XXX = AA|BB|CC|DD|EE|FF|GG deriving (Enum, Show)

Input: enumFromThenTo AA CC FF

Output: [AA,CC,EE]