HF RL Explorer

Clojure Factorial Stack Overflow Fix

Clojure Factorial Stack Overflow Fix: a task in Terminal-Lego-15k (Harbor dataset). In Clojure, a naive recursive implementation of the factorial function causes a StackOverflowError when called with large numbers. This happens because Clojure (running on the JVM) does not automatically optimize…

The task

In Clojure, a naive recursive implementation of the factorial function causes a `StackOverflowError` when called with large numbers. This happens because Clojure (running on the JVM) does not automatically optimize tail-recursive calls.

Part of PrimeIntellect/Terminal-Lego-15k.