Skip to content

Examples

These examples come directly from segfaultcafe/flecha. They exercise syntax and compiler behavior used by the project itself.

  1. Factorial
  2. Structures
  3. Iteration
  4. Fixed arrays
  5. Error values
  6. Checked references
  7. Ownership contracts
  8. Raw allocation
Terminal window
build/flecha check examples/factorial.fl
build/flecha build examples/factorial.fl -o build/factorial
./build/factorial

Use the Examples section in the sidebar to browse the full synced set.