Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4878

Re: execution model: Function vs. delayed execution

From Alan <alan.isaac@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: execution model: Function vs. delayed execution
Date 2011-09-12 08:25 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j4kflh$kga$1@smc.vnet.net> (permalink)
References <j4fhvn$2gr$1@smc.vnet.net> <j4i6d3$c0m$1@smc.vnet.net>

Show all headers | View raw


On Sunday, September 11, 2011 7:34:59 AM UTC-4, Oleksandr Rasputinov wrote:
> Function employs strict lexical scoping that overrides the HoldFirst  
> attribute of Set:
> 
> In[1] :=
> Function[x, x = DeleteDuplicates[x]; x][{1, 1, 2}] // Trace

[snip]

> this is documented via the statement,
> 
> "Function has attribute HoldAll. The function body is evaluated only after  
> the formal parameters have been replaced by arguments."


*Very* helpful!  I did read that documentation more than once,
but now I understand what it is saying.
Thanks!
Alan Isaac

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

execution model: Function vs. delayed execution Alan <alan.isaac@gmail.com> - 2011-09-10 11:34 +0000
  Re: execution model: Function vs. delayed execution David Bailey <dave@removedbailey.co.uk> - 2011-09-11 11:31 +0000
  Re: execution model: Function vs. delayed execution "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-09-11 11:34 +0000
    Re: execution model: Function vs. delayed execution Alan <alan.isaac@gmail.com> - 2011-09-12 08:25 +0000

csiph-web