Added USERLIB with prepend and set.

Added a q shortcut to quote
get-doc and set-doc no longer conditionally evaluate args
Fixed bug in let, documented potential performance improvements
upped default history to 5k lines
This commit is contained in:
Ava Apples Affine 2023-03-17 13:06:27 -07:00
parent a01df6b7b2
commit 1ee9ba55fb
Signed by: affine
GPG key ID: 3A4645B8CF806069
7 changed files with 70 additions and 25 deletions

View file

@ -205,8 +205,13 @@ pub fn let_callback(ast: &Seg, syms: &mut SymTable) -> Result<Ctr, String> {
// we need to get any var declared from within the let eval forms
// those need to exist in the outside context
// TODO: make this more optimal
// How can we skip iterations?
// implement a counter for number of calls to def
// store it inside the SymTable and Symbol
// only re-insert into global scope what is most recent
for i in localsyms.iter() {
if !locals.contains(i.0) && !syms.contains_key(i.0) {
if !locals.contains(i.0) {
syms.insert(
i.0.clone(),
i.1.clone(),