Re: Position of Last Element in List
- To: mathgroup at smc.vnet.net
- Subject: [mg94215] Re: Position of Last Element in List
- From: Raffy <raffy at mac.com>
- Date: Mon, 8 Dec 2008 06:21:27 -0500 (EST)
- References: <ghb02f$oho$1@smc.vnet.net> <ghb5dv$rmb$1@smc.vnet.net>
On Dec 6, 3:13 am, SigmundV <sigmu... at gmail.com> wrote: > Hello Raffy, > > Excuse me, but I do not see what you want and what you would use it > for. The sentence "the last position of an > element at level 1 in a list" sounds a bit cryptic to me. Say that we > have the list {{1, 2, 4, 6, -1}, {4, 10, 8, -2, 10}}, which is a list > of lists. Here level 1 consists of the two lists {1, 2, 4, 6, -1} and > {4, 10, 8, -2, 10}, right? How should "the last position of an > element" be understood here? > > Regards, > Sigmund > The elements at level 1 would be: {1, 2, 4, 6, -1} and {4, 10, 8, -2, 10} If you asked for the last position of 2? It would return $Failed (or something equiv). If you asked for the last position of {1, 2, 4, 6, -1} ? It would return 1.