Justin Walker on Sun, 14 Nov 2004 06:26:28 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Lists and residue classes



On Nov 13, 2004, at 20:49, Igor Schein wrote:

On Sat, Nov 13, 2004 at 05:34:00PM -0800, Justin Walker wrote:
Hi, all,

Two (unrelated) questions:

- is there a way to remove an element from a list (t_LIST)?  Pawing
through the user's guide didn't provide an explicit answer.

removefromlist(list,index)=List(vecextract(Vec(list),2^length(list)-1 -2^index/2))

Thanks. It would have taken a lot of digging to come up with that (I'm not that well-versed in gp's list processing mechanisms).

But maybe a native function to do just that without converting to Vec
first should be introduced for the sake of completeness?

I'd have to say yes.

Thanks for your help.

Regards,

Justin

--
/~\ The ASCII           Justin C. Walker, Curmudgeon-at-Large
\ / Ribbon Campaign
 X  Help cure HTML Email
/ \