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


Groups > comp.soft-sys.math.mathematica > #1998 > unrolled thread

HoldAll/HoldRest // updated

Started by"Scot T. Martin" <smartin@seas.harvard.edu>
First post2011-04-29 11:34 +0000
Last post2011-04-29 11:34 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  HoldAll/HoldRest // updated "Scot T. Martin" <smartin@seas.harvard.edu> - 2011-04-29 11:34 +0000

#1998 — HoldAll/HoldRest // updated

From"Scot T. Martin" <smartin@seas.harvard.edu>
Date2011-04-29 11:34 +0000
SubjectHoldAll/HoldRest // updated
Message-ID<ipe7o9$r36$1@smc.vnet.net>
Fixing small but important typos from email of a few minutes ago.... and re-posting:



Some kind of issue going on here between the interactions of HoldAll and HoldRest of ValueQ[...], If[...], and Function[...]. Anyone know the solution so that Out[3] results in 5?



In[1]:= valueQ = If[ValueQ[#], #, False] &



Out[1]= If[ValueQ[#1], #1, False] &



In[2]:= x = 5



Out[2]= 5



In[3]:= valueQ[x]



Out[3]= False



In[4]:= If[ValueQ[x], x, False]



Out[4]= 5

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web