Note

The wasCircularListReverse function takes as input a circular list and permutes all the elements backward. An example call is the following:

list a = [ 1, 2, 3, 4, 5 ];
a = wasCircularListReverse(a);

after which the contents of the list a will be:

2 3 4 5 1

Code

///////////////////////////////////////////////////////////////////////////
//  Copyright (C) Wizardry and Steamworks 2014 - License: GNU GPLv3      //
///////////////////////////////////////////////////////////////////////////
list wasCircularListReverse(list input) {
    string in = llList2String(input, 0);
    input = llDeleteSubList(input, 0, 0);
    return input + in;
}

secondlife/circular_double_linked_lists/list/reverse.txt ยท Last modified: 2017/02/22 18:20 (external edit)

Access website using Tor


For the copyright, license, warranty and privacy terms for the usage of this website please see the license and privacy pages.