mattbierner / khepri

ECMAScript derived programming language
http://khepri-lang.com/
MIT License
67 stars 3 forks source link

Recursive Variable Declaration Function Inline Explosion #125

Closed mattbierner closed 9 years ago

mattbierner commented 9 years ago
var count = \n -> ? n === 0 :0 :1 + count(n - 1);
count(3);

Currently blows up the stack due to how Khepri is handling working values during the inlining stage. The same code with an immutable binding work just fine as do other binding forms such as let expressions:

var count := \n -> ?n === 0 :0 :1 + count(n - 1);
count(3);