MathGroup Archive 2013

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

Search the Archive

Re: Unprotect[] Protect[] redefining builtin but keep original available


On 2013-08-13 07:56:31 +0000, roby said:

> Dear Group
> 
> Is it in general possible to redefine mathematica builtins but still 
> call the original function from within (but not only from there) the 
> redefinition ?
> 
> In particular I would like to overload a builtin (distinguished by an 
> additional Option additionalopt->o) and keep the possibility to call 
> the original (distinguished by omitting the additional Option or
> by setting additionalopt->None)
> 
> Regards Robert

Take a look here (practially the same as Chris's answer):

http://stackoverflow.com/questions/4198961/what-is-in-your-mathematica-tool-bag/5149656#5149656 


Many people on Mathematica.SE refer to this technique as the 
"Villegas-Gayley trick"

To see many real world uses of the technique, you can look at this search:

http://mathematica.stackexchange.com/search?q=villegas+gayley




  • Prev by Date: Problem with change of variables in an integral
  • Next by Date: Re: Problem with change of variables in an integral
  • Previous by thread: Re: Unprotect[] Protect[] redefining builtin but keep original available
  • Next by thread: Re: MathSource Notebook Smith Normal Form Error - How to Correct?