Note

The wasCircularListInsertAfter function takes as input a circular list, an element in the list an element to insert and inserts the element after the element in the list and returns the resulting list. An example call is the following:

list a = [ 1, 2, 3, 4, 5 ];
a = wasCircularListInsertAfter(a, [1], ["b"]);

after which the contents of the list a will be:

1 b 2 3 4 5

Code

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

secondlife/circular_double_linked_lists/list/insert_after.txt ยท Last modified: 2022/11/24 07:46 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


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