Re: List representation using element position
- To: mathgroup at smc.vnet.net
- Subject: [mg72519] Re: List representation using element position
- From: "Ray Koopman" <koopman at sfu.ca>
- Date: Thu, 4 Jan 2007 06:40:18 -0500 (EST)
- References: <enfgem$ss1$1@smc.vnet.net><enfvj8$6vc$1@smc.vnet.net>
Ray Koopman wrote:
> fPoz[lstIn_] := {#[[1,1]],Last/@#}& /@ Split[
> Sort@MapIndexed[Flatten@{##}&,lstIn], #1[[1]]==#2[[1]] ]
That should be
fPoz[lstIn_] := {#[[1,1]],Last/@#}& /@ Split[
Sort@MapIndexed[Flatten@{##}&,lstIn], #1[[1]]==#2[[1]]&]
which will still be slow but will at least get what was wanted.