Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Jon Harrop <usenet@xxxxxxxxxxxxxx>
- Date: Sun, 21 Aug 2005 04:55:24 +0100
Nathan Baum wrote:
> This distinction is very significant, because QUOTE only 'protects'
> against one round of evaluation.
>
> (EVAL A) => <the result of evaluating the value of A>
> (EVAL 'A) => <the value of A>
> (EVAL ''A) => A
>
> In a hypothetical Mathematica-like dialect of Lisp,
>
> A => <the value of A>
> 'A => <the value of A>
> ''A => <the value of A>
> (EVAL A) => <the value of A>
> (EVAL 'A) => <the value of A>
> (EVAL ''A) => <the value of A>
No:
In[15]:= a=3
Out[15]= 3
In[16]:= a
Out[16]= 3
In[17]:= Hold[a]
Out[17]= Hold[a]
In[18]:= Release[Hold[a]]
Out[18]= 3
In[19]:= Release[Hold[Hold[a]]]
Out[19]= Hold[a]
So Hold "protects against one round" of Release.
--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com
.
- Follow-Ups:
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Richard Fateman
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: josephoswaldgg@xxxxxxxxxxx
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Peter Seibel
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Nathan Baum
- Re: Lisp's QUOTE and Mathematica's "Hold"
- References:
- Very poor Lisp performance
- From: Jon Harrop
- Re: Very poor Lisp performance
- From: Jon Harrop
- Re: Very poor Lisp performance
- From: Ulrich Hobelmann
- Re: Very poor Lisp performance
- From: Jon Harrop
- Re: Very poor Lisp performance
- From: Brian Downing
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Jon Harrop
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Nathan Baum
- Very poor Lisp performance
- Prev by Date: Re: Very poor Lisp performance
- Next by Date: Re: Lisp's QUOTE and Mathematica's "Hold"
- Previous by thread: Re: Lisp's QUOTE and Mathematica's "Hold"
- Next by thread: Re: Lisp's QUOTE and Mathematica's "Hold"
- Index(es):
Relevant Pages
|