[Home] [By Thread] [By Date] [Recent Entries]
On 22/04/2011 08:24, David Carlisle wrote:
On 22/04/2011 02:28, Steve Fogel wrote:Hi, all... If I had this problem, I think I would want to take a step back: where do these two variables come from? Is there any possibility that instead of setting the variable $mynode to be one of the nodes in $nodelist, one could set a variable $myNodePosition to be the integer position of $mynode in $nodelist? However, for the problem as stated, another option is $nodelist[(1 to count($nodelist))[subsequence($nodelist, ., 1) is $mynode] - 1] In 3.0 this is a classic case for some useful higher-order functions. Michael Kay Saxonica
|

Cart



