It's choking on this:
trip = distance [l + i] [l + (i + 1)]
Any idea how to creat an expression which will result in this:
trip = distance [ l1] [l2] // first time around
trip = distance [l2] [l3] //second time around
trip = distance [l3] [l4] //third time around
etc.....
Tried this:
trip = distance ["l"+ i] ["l" + i + 1];
but no. :-(