MathGroup Archive 1991

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

Search the Archive

Help with Programming Mathematica

  • To: mathgroup at yoda.ncsa.uiuc.edu
  • Subject: Help with Programming Mathematica
  • From: Kevin McIsaac <Kevin_McIsaac>
  • Date: 24 Jan 91 10:09:54

SUBJECT:  Help with Programming Mathematica

This can be trivially written in Mathematica using rules.

Clarify = {{a_}}->a
Coalesce = {a_, a_} -> a
Absorb = {a_,{}} -> {}
Extract = { {a_, {a_}} -> {a,{}},
			{{a_}, {b_,{c_, a_}}} -> {a, {b, {c}}},
			{{b_, c_}, b_} -> {c}
		   }
Boundary = Flatten[{Clarify, Coalesce, Absorb, Extract}];

{{a},{b,{c,a}}} //. Boundary




  • Prev by Date: Controlling evaluation or Re: Plot[] acting funny (help)
  • Next by Date: Theta Functions
  • Previous by thread: Controlling evaluation or Re: Plot[] acting funny (help)
  • Next by thread: Theta Functions