MathGroup Archive 2006

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

Search the Archive

Re: MemberQ


Hi leigh,

I am not a specialist, but everything seems ok to me

In[1]:=
$Version

Out[1]=
"4.0 for Microsoft Windows (April 21, 1999)"

In[2]:=
InputForm[lst=Range[0,1,1/10]]

Out[2]//InputForm=
{0, 1/10, 1/5, 3/10, 2/5, 1/2, 3/5, 7/10, 4/5, 9/10, 1}

In[3]:=
MemberQ[lst,2/10]//Trace//InputForm

Out[3]//InputForm=
{{HoldForm[lst], HoldForm[{0, 1/10, 1/5, 3/10, 2/5, 1/2, 3/5, 7/10,
4/5, 9/10, 1}]},
 {{HoldForm[10^(-1)], HoldForm[1/10]}, HoldForm[2/10], HoldForm[1/5]},
 HoldForm[MemberQ[{0, 1/10, 1/5, 3/10, 2/5, 1/2, 3/5, 7/10, 4/5, 9/10,
1}, 1/5]], HoldForm[True]}

In[4]:=
MemberQ[lst,HoldForm[2/10]]//Trace//InputForm

Out[4]//InputForm=
{{HoldForm[lst], HoldForm[{0, 1/10, 1/5, 3/10, 2/5, 1/2, 3/5, 7/10,
4/5, 9/10, 1}]},
 HoldForm[MemberQ[{0, 1/10, 1/5, 3/10, 2/5, 1/2, 3/5, 7/10, 4/5, 9/10,
1}, HoldForm[2/10]]], HoldForm[False]}

Cheers

Jim


  • Prev by Date: Re: Question about DiracDelta
  • Next by Date: Re: using answer form reduce
  • Previous by thread: Re: Re: MemberQ
  • Next by thread: Re: MemberQ