Add TCO option to BuiltinCombinator and convert cond and eval to use this, then rewrite self-hosted do so that it too is TCO. This allows us to self-host cond (which we did) so without worring about stack space for large arrays

This commit is contained in:
Nathan Braswell
2020-09-07 15:41:27 -04:00
parent c0eca02e43
commit 3cb5c8d827
4 changed files with 299 additions and 338 deletions

View File

@@ -1,5 +1,3 @@
; Load prelude so we get fun, lambda, if, quoting, etc
(load-file "./k_prime_stdlib/prelude.kp")
; First quick lookup function, since maps are not built in
(fun get-value-helper (dict key i) (if (>= i (len dict))
nil