controlling evaluation
- To: mathgroup at smc.vnet.net
- Subject: [mg24530] controlling evaluation
- From: richard nathan linger <rlinger at students.uiuc.edu>
- Date: Mon, 24 Jul 2000 03:04:10 -0400 (EDT)
- Organization: University of Illinois at Urbana-Champaign
- Sender: owner-wri-mathgroup at wolfram.com
In[1]:= func[x_][_] := x In[2]:= func[0][Print["bad"]] "bad" Out[2]= 0 Is there any way to modify the definition of func such that the Print statement doesn't evaluate? Setting the Attributes of func only changes how x is handled. For those who may care, I'm playing with combinators. I want to be able to use the Y combinator for recursion, but this won't work unless I can eventually get it on the unchosen side of a branch statement (via the combinators K[I] or K). If at all possible, I would like to avoid wrapping all my combinators with some HoldAll-attributed head. Nathan Linger