home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e032 / 3.ddi / FILES / PROGRAMM.PAK / WRAPHOLD.M < prev   
Encoding:
Text File  |  1992-07-29  |  510 b   |  18 lines

  1.  
  2. (*********************************************************************
  3.  
  4.         Adapted from
  5.         Roman E. Maeder: Programming in Mathematica,
  6.         Second Edition, Addison-Wesley, 1991.
  7.  
  8.  *********************************************************************)
  9.  
  10.  
  11. WrapHold::usage = "WrapHold[expr] wraps Hold[] around the head
  12.     and the elements of expr without evaluating them."
  13.  
  14. SetAttributes[WrapHold, HoldAll]
  15.  
  16. WrapHold[expr_] :=
  17.     Map[ Hold, MapAt[Hold, Hold[expr], {1, 0}], {2}] [[1]]
  18.