diff options
author | Keith Packard <keithp@keithp.com> | 2017-12-01 15:40:23 -0600 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-12-01 15:40:23 -0600 |
commit | c31744299e5a4342bbe26d3735ee2d8f09192ae9 (patch) | |
tree | 108153f1d01c56800d6e4dc0c56dbcce979717be /src/lisp/ao_lisp_stack.c | |
parent | 98923ae1189f062b8b94120d47a56892db25493f (diff) |
altos/lisp: split set/def. Add def support to lambdas
In scheme, set can only re-define existing variables while def cannot
redefine existing variables in lambda context. Def within lambda
creates a new variable at the nearest enclosing scope.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp_stack.c')
-rw-r--r-- | src/lisp/ao_lisp_stack.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lisp/ao_lisp_stack.c b/src/lisp/ao_lisp_stack.c index 9d6cccc4..e7c89801 100644 --- a/src/lisp/ao_lisp_stack.c +++ b/src/lisp/ao_lisp_stack.c @@ -103,7 +103,9 @@ ao_lisp_stack_new(void) int ao_lisp_stack_push(void) { - struct ao_lisp_stack *stack = ao_lisp_stack_new(); + struct ao_lisp_stack *stack; + + stack = ao_lisp_stack_new(); if (!stack) return 0; |