Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: Overloading StringJoin

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109794] Re: Overloading StringJoin
  • From: chris <aarthur at tx.rr.com>
  • Date: Tue, 18 May 2010 02:01:21 -0400 (EDT)

look at 'notation' package for possibilities

Mark Adler a =E9crit :
> 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: Multiple FindRoot
  • Next by Date: Re: Interference data in optica
  • Previous by thread: Re: Handbook of Mathematical functions
  • Next by thread: Re: Overloading StringJoin