Re: Extract values and multilpicities from list
- To: mathgroup at smc.vnet.net
- Subject: [mg64882] Re: Extract values and multilpicities from list
- From: "Mark Adler" <madler at alumni.caltech.edu>
- Date: Mon, 6 Mar 2006 05:01:46 -0500 (EST)
- References: <due96k$ach$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
The function Split[] already does this. Your particular output format can be generated thusly: {First[#], Length[#]} & /@ Split[Sort[a]] mark