Examples
These examples come directly from segfaultcafe/flecha. They exercise syntax and compiler behavior used by the project itself.
A good reading order
Section titled “A good reading order”- Factorial
- Structures
- Iteration
- Fixed arrays
- Error values
- Checked references
- Ownership contracts
- Raw allocation
Run an example
Section titled “Run an example”build/flecha check examples/factorial.flbuild/flecha build examples/factorial.fl -o build/factorial./build/factorialUse the Examples section in the sidebar to browse the full synced set.