Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Examples Overview

Lumen ships example programs baked directly into the lumen binary (see include/examples.h). You don’t need to find them on disk — generate any of them with:

lumen --examples <name>
ExampleGeneratesDescription
ageage.lmnAge calculator — reads a birth year, computes age
fizzbuzzfizzbuzz.lmnClassic FizzBuzz up to a user-supplied N
temperaturetemperature.lmnCelsius ↔ Fahrenheit converter using routines
infinite-loopjump.lmnMinimal label/jump demonstration

Two additional programs — math.lmn and paint.lmn — live in the repository’s examples/ folder as source but aren’t wired into lumen --examples; you can still read them directly from the repo for more arithmetic and expression examples.

Each example is broken down in its own page in this chapter, in increasing order of what language features it touches.