MathGroup Archive 1999

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

Search the Archive

Re: Pattern example

  • To: mathgroup at smc.vnet.net
  • Subject: [mg19337] Re: Pattern example
  • From: Martin Stockhammer <martin.stockhammer at visualanalysis.com>
  • Date: Fri, 20 Aug 1999 23:09:26 -0400
  • Organization: Visual Analysis GmbH
  • References: <7p2vem$ajd@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi chris,

chris schrieb:
> Then
> {{1+a},{2+a},{3+a}}  /.  t_->c
> c
>  this is no more a list, but

The whole list {{1+a},{2+a},{3+a}} matches the pattern and is replaced
by c.

> 
> FullForm[{{1+a},{2+a},{3+a}}  /.  {t_}->c]
> List[c,c,c]

with {t_} only lists with one element for example {1+a} match the 
pattern and will be replaced.

Bye
Martin


  • Prev by Date: Finding Solution to Set of Equations with Inequality Constraints
  • Next by Date: Re: Tricky Symbolizations with the Notation Package
  • Previous by thread: Re: Pattern example
  • Next by thread: Re: Pattern example