mirror of
https://github.com/helix-editor/helix
synced 2026-07-28 23:33:35 +02:00
21 lines
244 B
Nim
21 lines
244 B
Nim
proc greet(name: string): string =
|
|
result = "hello, " & name
|
|
|
|
iterator items(n: int): int =
|
|
for i in 0 .. n:
|
|
yield i
|
|
|
|
for i in 0 .. 10:
|
|
echo i
|
|
|
|
while running:
|
|
step()
|
|
|
|
case n
|
|
of 1:
|
|
echo "one"
|
|
of 2:
|
|
echo "two"
|
|
else:
|
|
echo "many"
|