mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
15 lines
182 B
Nim
15 lines
182 B
Nim
discard """
|
|
output: "A\nB\nC"
|
|
"""
|
|
|
|
type TAlphabet = enum
|
|
A, B, C
|
|
|
|
iterator items(E: typedesc[enum]): E =
|
|
for v in low(E)..high(E):
|
|
yield v
|
|
|
|
for c in TAlphabet:
|
|
echo($c)
|
|
|