I've got some presumably standard-lisp code [from
http://aima.cs.berkeley.edu/lisp/].
and I want to port it to my [ETH-Oberon] Scheme.
And I'm not much familiar with lisp/scheme.
The compile/interpretation shows an error at: #'(
in the defun: --------
(defun rename-variables (x)
"Replace all variables in x with new ones."
(sublis (mapcar
snaem '#' yltnerappa ?? (sublis (mapcar #'(lambda (var)
(make-binding var (new-variable var)))
(variables-in x))
x))
------
How would I 're/define' this "#'" in my Scheme ?
TIA
== Chris Glur.
········@gmail skrev:
> I've got some presumably standard-lisp code [from
> http://aima.cs.berkeley.edu/lisp/].
>
> and I want to port it to my [ETH-Oberon] Scheme.
> And I'm not much familiar with lisp/scheme.
> The compile/interpretation shows an error at: #'(
> in the defun: --------
> (defun rename-variables (x)
> "Replace all variables in x with new ones."
> (sublis (mapcar
> snaem '#' yltnerappa ?? (sublis (mapcar #'(lambda (var)
> (make-binding var (new-variable var)))
> (variables-in x))
> x))
> ------
> How would I 're/define' this "#'" in my Scheme ?
In Common Lisp some put a #' before lambda expressions.
In Scheme no such #' is needed.
Therefore change #'(lambda (var) ...) to (lambda (var) ...).
Keep in mind that Common Lisp and Scheme are two different
languages, so expect things not easily ported.
--
Jens Axel S�gaard
Jens Axel Soegaard <·························@soegaard.net> writes:
> ········@gmail skrev:
>> I've got some presumably standard-lisp code [from
>> http://aima.cs.berkeley.edu/lisp/].
>> and I want to port it to my [ETH-Oberon] Scheme.
>> And I'm not much familiar with lisp/scheme.
>> The compile/interpretation shows an error at: #'(
>> in the defun: --------
>> (defun rename-variables (x)
>> "Replace all variables in x with new ones."
>> (sublis (mapcar
>> snaem '#' yltnerappa ?? (sublis (mapcar #'(lambda (var)
>> (make-binding var (new-variable var)))
>> (variables-in x))
>> x))
>> ------
>> How would I 're/define' this "#'" in my Scheme ?
>
> In Common Lisp some put a #' before lambda expressions.
> In Scheme no such #' is needed.
In Common Lisp it's not needed either.
> Therefore change #'(lambda (var) ...) to (lambda (var) ...).
Yes.
> Keep in mind that Common Lisp and Scheme are two different
> languages, so expect things not easily ported.
--
__Pascal Bourguignon__
········@gmail skrev:
> I've got some presumably standard-lisp code [from
> http://aima.cs.berkeley.edu/lisp/].
>
> and I want to port it to my [ETH-Oberon] Scheme.
> And I'm not much familiar with lisp/scheme.
> The compile/interpretation shows an error at: #'(
> in the defun: --------
> (defun rename-variables (x)
> "Replace all variables in x with new ones."
> (sublis (mapcar
> snaem '#' yltnerappa ?? (sublis (mapcar #'(lambda (var)
> (make-binding var (new-variable var)))
> (variables-in x))
> x))
> ------
> How would I 're/define' this "#'" in my Scheme ?
If you haven't found it alreay, the following page
will be useful.
http://www.cs.utexas.edu/~novak/schemevscl.html
--
Jens Axel S�gaard