Re: Controlling evaluation
- To: mathgroup at smc.vnet.net
- Subject: [mg83980] Re: Controlling evaluation
- From: Szabolcs Horvát <szhorvat at gmail.com>
- Date: Thu, 6 Dec 2007 02:40:06 -0500 (EST)
- References: <fiji6s$ikm$1@smc.vnet.net> <fim998$run$1@smc.vnet.net> <fj65lm$frg$1@smc.vnet.net>
Yaroslav Bulatov wrote: > > My own question for the group -- what is the recommended way to define > a function only for arguments with HoldAll head (like Hold, Condition, > etc)? > The obvious solution is fun[completeArg : (head_[___])] /; MemberQ[Attributes[head], HoldAll] := something (* do something with completeArg *) But most probably you already know about this solution. I do not know if there are better or more compact ways to do it. -- Szabolcs