Examples
Curated starter examples from `.sources/vela/examples`.
1. First files to run
vela run examples/hello.vela
vela run examples/calculator.vela
vela run examples/vectors.vela
hello.vela: basic output, function, loop.calculator.vela: tokenizer and recursive-descent parser.vectors.vela: vectorized operators and dot pipelines.
2. Core language examples
args.vela—ARGVas a global argument list.datatypes.vela— records, pattern matching, tagged unions.fib.vela— recursion and mutable loops.eval.vela— AST-style ADT evaluation.modules_demo.vela—use "path.vela".
3. Strings and text
codex_text_*examples for palindrome, parsing, CSV-style shaping, markdown conversion.text_csv.velaandparse_csv_typed.vela— parse records and infer string→number conversions.wordcount.vela— immutable map-style frequency counting.
4. Data and statistics
vectors.velaanddataframe.velafor the data-oriented side.stats_*examples for averages, variance, covariance, regression.
5. Algorithms
algo_*andcodex_algo_*show recursion, sorting, search, graphs.ds_*andvm_*show user-defined recursive structures and tiny interpreters.
6. Games and simulations
game_*andcodex_sim_*cover deterministic loops, randomness, and simulation-style examples.
7. How to use EXAMPLES.md
The source catalog in docs/EXAMPLES.md is generated as an annotated index and stays the authoritative
list. Use it when you want the complete coverage.