MathGroup Archive 2010

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

Search the Archive

Overloading StringJoin

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109786] Overloading StringJoin
  • From: Mark Adler <madler at alumni.caltech.edu>
  • Date: Mon, 17 May 2010 07:12:30 -0400 (EDT)

I use Join enough that I like to overload StringJoin to do it:

Unprotect[StringJoin];
x_List <> y_List := x~Join~y
Protect[StringJoin];

Then I can do this:

{1, 2} <> {3, 4}
{1, 2, 3, 4}

Why doesn't Mathematica already do this?  It seem like an obvious use
of <>.  Or is there a good reason that they don't do this, and
therefore if I do, it makes me a bad person?

Mark


  • Prev by Date: Re: Latex, Mathematica, and journals
  • Next by Date: Remove points from InterpolatingFunction
  • Previous by thread: Re: Questions about Word Wrap etc.
  • Next by thread: Handbook of Mathematical functions