Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Making a new definition of Equal work with lists as well

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63361] Making a new definition of Equal work with lists as well
  • From: "Dan Bernstein" <dan.bernstein at gmail.com>
  • Date: Mon, 26 Dec 2005 04:59:23 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

I have defined
Equal[a_CL,b_CL] := a[[1]]-a[[2]] == b[[1]]-b[[2]]
and then
CL[2,3] == CL[4,5]
CL[2,3] == CL[2,4]
evaluate to True and False respectively, as expected. However,
{CL[2,3]} == {CL[4,5]}
just stays in that form.

What should I do to make list equality use my "CL equality"?

Thanks in advance,
-- Dan Bernstein


  • Prev by Date: Re: Questions regarding MatrixExp, and its usage
  • Next by Date: Re: Re: problems with memory usage
  • Previous by thread: Puzzle Challenge
  • Next by thread: Re: Making a new definition of Equal work with lists as well