Are compiled maxima functions lexically scoped????
Subject: Are compiled maxima functions lexically scoped????
From: Richard Fateman
Date: Thu, 11 Jan 2007 16:54:12 -0800
> -----Original Message-----
> From: Michel Van den Bergh [mailto:michel.vandenbergh at uhasselt.be]
> Sent: Thursday, January 11, 2007 3:19 PM
> For example in python it is perfectly legal to write
>
> def f(s,t):
> return s(t)
>
Presumably Python is modeled after Lisp-1 semantics, like scheme, a dialect
of lisp.
To elaborate on the difference here...
In scheme you can write
(define (f s t)(s t))
It is also possible then to do
(define (f s t u)(s t u))
In which case (f '* 2 3) returns 6.
In common lisp, by contrast
(defun f (s t u)(s t u))
(f '* 2 3)
would say "s undefined function", because the parameter s and the function s
are unrelated. To connect them,
(defun f (s t u)(funcall s t u))
(f '* 2 3) returns 6.
.