MathGroup Archive 2006

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

Search the Archive

Curiosity concerning transformation rules for List

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70860] Curiosity concerning transformation rules for List
  • From: "Andrew Moylan" <andrew.j.moylan at gmail.com>
  • Date: Mon, 30 Oct 2006 05:32:20 -0500 (EST)

Since the List symbol is locked, I am curious about the possibility (or
otherwise) of giving definitions for which the left-hand-side of the
transformation rule contains only the List symbol. Here's an arbitrary,
explicit example:

Is it possible to make a definition such that: any list of two
identical elements evaluates to the empty list? E.g. {x_, x_} -> {}.

I can't see any way this transformation rule can be added. It's not
possible to modify the DownValues for List; and there are no
first-level symbols to which an UpValue can be added. Does anyone have
any ideas?


  • Prev by Date: Re: RandomList and pure function
  • Next by Date: Re: RandomList and pure function
  • Previous by thread: surface plot of an image
  • Next by thread: FindRoot, suppressing complex interval-numbers