List Navigation
Peter W A Wood
peterwawood at gmail.com
Sat Jun 6 21:29:02 EDT 2015
One of the features of LiveCode is its strong list processing capabilities. In some ways, LiveCode does such a good job of list processing that it is almost hidden. One thing that I’ve not found, but I’m hoping somebody on the list has, is list navigation.
What I’m looking for is something similar to Rebol’s next, back, tail and head functions. They work like this:
list: [1 2 3 4 5] ; defines list with 5 elements
next list ; shows the “visible” list as [2 3 4 5]
first next list ; returns 2
list: tail list ; changes the "visible” list to [] (empty)
back list ; changes the “visible” list to [5]
list: head list ; returns “full visibility” to the list
Does anybody know of an equivalent in LiveCode?
Regards
Peter
More information about the use-livecode
mailing list