tisp

tiny lisp
git clone git://edryd.org/tisp
Log | Files | Refs | LICENSE

commit eee745b443361fa93086ade60b349caab25b10f1
parent 24e09c79abca60b74bced0586f04330d29d8cac0
Author: Ed van Bruggen <edvb@uw.edu>
Date:   Mon, 25 Mar 2019 19:56:20 -0700

Rename begin primitive to 'do'

Diffstat:
tibs/repl.tsp | 2+-
tisp.c | 6+++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tibs/repl.tsp b/tibs/repl.tsp @@ -2,7 +2,7 @@ (print "> ") ((lambda (expr) (cond ((= expr 'quit) (newline)) - (t (begin + (t (do ((lambda (eval-expr) (cond ((not (void? eval-expr)) (disp eval-expr)))) diff --git a/tisp.c b/tisp.c @@ -608,7 +608,7 @@ Val tisp_parse_file(Env env, char *fname) { struct Str str = { NULL }; - Val ret = mk_pair(mk_sym(env, "begin"), env->nil); + Val ret = mk_pair(mk_sym(env, "do"), env->nil); Val v, last = ret; char *file; if (!(file = tisp_read_file(fname))) @@ -785,7 +785,7 @@ prim_void(Env env, Val args) } static Val -prim_begin(Env env, Val args) +prim_do(Env env, Val args) { Val v; if (!(v = tisp_eval_list(env, args))) @@ -955,7 +955,7 @@ tisp_env_init(size_t cap) tsp_env_fn(cons); tsp_env_fn(quote); tsp_env_fn(void); - tsp_env_fn(begin); + tsp_env_fn(do); tsp_env_fn(eval); tsp_env_name_fn(=, eq); tsp_env_fn(cond);