This file is generated for E2E parsing.
Document ID: ipmjzmrdvk-mmm6myjp
This document contains a variety of concise, self-contained code examples across multiple programming languages, demonstrating common patterns, data structures, I/O, and control flow to exercise parsing in a realistic yet compact way.
Each example includes a short description followed by a fenced code block.
Where helpful, examples may include brief variations in syntax or structure so the parser encounters a wider range of constructs across different ecosystems.
A simple, readable Python generator for producing Fibonacci numbers. It illustrates lazy iteration and clarity.
def fib(n):
a, b = 0, 1
for _ in range(n):
yield a
a, b = b, a + b
print(list(fib(10)))Julia list comprehension generating cubes of a range.
nums = 1:5
cubes = [n^3 for n in nums]
println(cubes)