Introduce a Python script that concatenates all Wren library source files into a single amalgamation file, resolving local `#include` directives recursively to eliminate internal header dependencies. Add a corresponding `wren.c` Makefile target that invokes the script on the core header and VM sources, along with `.DELETE_ON_ERROR` to clean up on failure.
The READ_BYTE and READ_SHORT macros are defined locally within functions
in wren_debug.c and wren_vm.c but were not being undefined after use,
causing potential redefinition warnings or errors when these macros
conflict with other definitions in the same translation unit. This
change adds #undef directives at the end of dumpInstruction in
wren_debug.c and runInterpreter in wren_vm.c to properly clean up
the macro definitions.
The static helper `callFunction` in wren_core.c was renamed to `callFn` to prevent symbol conflicts with the public `wrenCallFunction` API, ensuring unique linkage and clearer separation between internal and external call paths.
The link previously pointed to the old include/wren.h path but the file was moved to src/include/wren.h. Updated the URL in doc/site/embedding-api.markdown to reflect the new location.
Add test cases demonstrating that the reduce function works with string arrays
and concatenation, verifying both with and without initial accumulator values.
The test uses a list of characters ["W", "o", "r", "l", "d"] and the existing
sum function to show that reduce correctly folds strings in order.
Add a new test file `test/range/reduce.wren` that validates the `reduce` method on numeric ranges. The test exercises two cases: summing integers 1 through 10 (expecting 55) and finding the minimum value with an initial accumulator of 100 (expecting 1).
Replace the previous slice-based single-argument reduce implementation with an explicit iterator loop that seeds from the first element. This avoids the out-of-bounds range error on single-element lists and adds a Fiber.abort for empty sequences. Update the test to verify correct behavior for single-element and empty sequences.
Implement `reduce` on the `Sequence` class in core.wren with two overloads: one taking an initial accumulator and a function, and another using the first element as the initial accumulator. Add three test files covering normal reduction, single-element edge case, and wrong arity error.