MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Controlling evaluation

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.


  • Prev by Date: Re: Adding coloured Polygon to a BarChart
  • Next by Date: Re: expressions list -> equations list
  • Previous by thread: Re: Controlling evaluation
  • Next by thread: Re: Notebook programming: SlideShow: emulating bullet at-a-time