Re: StringJoin with ToString
- To: mathgroup at smc.vnet.net
- Subject: [mg98489] Re: StringJoin with ToString
- From: David Bailey <dave at removedbailey.co.uk>
- Date: Fri, 10 Apr 2009 04:59:50 -0400 (EDT)
- References: <gr6cbs$pva$1@smc.vnet.net> <gra1qi$2jl$1@smc.vnet.net> <grhhd3$j5n$1@smc.vnet.net>
replicatorzed at gmail.com wrote: > If I use a different name (e.g. ExtendedStringJoin, as it was > suggested), I loose the effective shorthand version (<>), as it would > still use the original function. Is there a way to overwrite at least > the definitions of the infix operator? You can't overwrite it (as far as I know), and in some ways that would be as bad as redefining the actual function, but you can co-opt an unused operator: In[1]:= SetAttributes[CirclePlus, Flat]; SetAttributes[CirclePlus, OneIdentity]; In[3]:= CirclePlus[x___] := f[x] In[4]:= a\[CirclePlus]b\[CirclePlus]c\[CirclePlus]d Out[4]= f[a, b, c, d] David Bailey http://www.dbaileyconsultancy.co.uk