Home/Modules/recursion

recursion

system module recursion

SLeeLa Recursion

This directory contains documentation, examples, and implementation notes for recursive programming in SLeeLa. The curated C/C++ source-file prototypes are collected in stanchion/.

Scope

Guidance

  1. Define a clear base case before implementing the recursive step.
  2. Ensure each recursive step makes measurable progress toward a base case.
  3. Consider iterative alternatives when recursion depth may be large or input is untrusted.
  4. Test empty, minimal, typical, and boundary inputs.
  5. Document expected depth and resource limits where they matter.

Status

The stanchion/ subdirectory provides 26 standalone C/C++ prototypes for generic, applied, scientific, and teaching use. These are reference examples, not SLeeLa-language implementations; compile and test them before treating them as verified.

The stanchion also includes type-specialized C and C++ recursion prototypes for the seven primitive contracts documented in lib/CORE.BASE.md (Boolean, Byte, Character, Integer, Long, Float, and Double).

Files 36