Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Identical elements

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88439] Re: Identical elements
  • From: "David Park" <djmpark at comcast.net>
  • Date: Mon, 5 May 2008 06:15:00 -0400 (EDT)
  • References: <fvhe2h$3th$1@smc.vnet.net>

list1 = {a, b, c};
list2 = {b, b, b};

SameQ @@ list1
False

SameQ @@ list2
True

@@ is Apply.

-- 
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/


"KFUPM" <hussain.alqahtani at gmail.com> wrote in message 
news:fvhe2h$3th$1 at smc.vnet.net...
> Dear All
>
> I have a list  and i need to test whether all the elements in the list
> are identical or no. What is the efficient way to do that? The output
> should be true if all elements are the same and False otherwise. One
> line command is preferred if possible.
>
> Your help is highly appreciated.
>
> Regards,
>
> HMQ
> 



  • Prev by Date: Re: Identical elements
  • Next by Date: Re: Help with Manipulate
  • Previous by thread: Re: Identical elements
  • Next by thread: Re: Identical elements