Note

The wasCircularListRemove function takes as input a circular list and an element and then removes an element from the list and returns the list. An example call is the following:

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

after which the contents of the list a will be:

2 3 4 5

Code

///////////////////////////////////////////////////////////////////////////
//  Copyright (C) Wizardry and Steamworks 2014 - License: GNU GPLv3      //
///////////////////////////////////////////////////////////////////////////
list wasCircularListRemove(list input, list node) {
    integer i = llListFindList(input, node);
    if(i == -1) return input;
    return llDeleteSubList(input, i, i);
}

secondlife/circular_double_linked_lists/list/remove.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.