Functions

This section provides detailed documentation for all built-in functions in RTR.

Categories

  1. Mathematical Functions

    • min, max, abs, round, floor, ceil, sqrt

  2. String Functions

    • join, split, chr, ord, length

  3. Array Functions

    • length, item, range

  4. Object Functions

    • keys, values, has, obj

  5. Logical Functions

    • all, any, not

  6. Utility Functions

    • log, return, error

Usage

Each function is documented with:

  • A description of what the function does

  • Example usage with expected output

  • Common use cases and patterns

Best Practices

  1. Use built-in functions when available instead of implementing your own

  2. Check function return values for error conditions

  3. Use appropriate functions for the data type you're working with

  4. Consider performance implications when using functions in loops

  5. Use descriptive variable names when storing function results

Last updated