Relocated (lambda->exp)

This commit is contained in:
Justin Ethier 2016-09-16 17:51:48 -04:00
parent df7640777f
commit 4f99b8b629
3 changed files with 6 additions and 5 deletions

View file

@ -17,6 +17,7 @@
macro:macro?
macro:expand
macro:add!
macro:cleanup
macro:load-env!
macro:get-env
macro:get-defined-macros

View file

@ -63,7 +63,6 @@
ast:lambda-formals->list
list->lambda-formals
list->pair
lambda->exp
app->fun
app->args
precompute-prim-app?
@ -327,10 +326,6 @@
(else
(cons (car lst) (loop (cdr lst)))))))
; lambda->exp : lambda-exp -> exp
(define (lambda->exp exp)
(cddr exp)) ;; JAE - changed from caddr, so we can handle multiple expressions
; app->fun : app-exp -> exp
(define (app->fun exp)
(car exp))

View file

@ -20,6 +20,7 @@
lambda-formals->list
lambda-varargs?
lambda->formals
lambda->exp
lambda-formals-type
lambda-varargs-var
pack-lambda-arguments
@ -200,6 +201,10 @@
(define (lambda->formals exp)
(cadr exp))
; lambda->exp : lambda-exp -> exp
(define (lambda->exp exp)
(cddr exp)) ;; JAE - changed from caddr, so we can handle multiple expressions
(define (lambda-varargs-var exp)
(if (lambda-varargs? exp)
(if (equal? (lambda-formals-type exp) 'args:varargs)