MathGroup Archive 2009

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

Search the Archive

Re: StringJoin with ToString

  • To: mathgroup at
  • Subject: [mg98489] Re: StringJoin with ToString
  • From: David Bailey <dave at>
  • Date: Fri, 10 Apr 2009 04:59:50 -0400 (EDT)
  • References: <gr6cbs$pva$> <gra1qi$2jl$> <grhhd3$j5n$>

replicatorzed at 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

  • Prev by Date: NetLink SEHException in getDefaultLaunchString
  • Next by Date: Re: how to build pattern for a square matrix of reals?
  • Previous by thread: Re: StringJoin with ToString
  • Next by thread: Re: StringJoin with ToString