Commit Graph

3 Commits

Author SHA1 Message Date
44ea1eebb0 style: auto-format example files with lux fmt
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 06:52:44 -05:00
ebc0bdb109 feat: improve error messages with context lines
- Show 2 lines of context before and after errors (dimmed)
- Fix guessing_game.lux to be non-interactive for testing
- Use binary search simulation to demonstrate game logic

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 18:13:57 -05:00
0b5abece5f feat: add comprehensive example programs
Standard examples (examples/standard/):
- hello_world: Basic effect usage
- fizzbuzz: Classic programming exercise
- factorial: Recursive and tail-recursive versions
- primes: Prime number generation
- guessing_game: Interactive Random + Console effects
- stdlib_demo: Demonstrates List, String, Option, Math modules

Showcase examples (examples/showcase/):
- ask_pattern: Resumable effects for config/environment
- custom_logging: Custom effect with handler
- early_return: Fail effect for clean error handling
- effect_composition: Combining multiple effects
- higher_order: Closures and function composition
- pattern_matching: ADTs and exhaustive matching

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 17:25:04 -05:00