Note

The wasCircularListPrev function takes as input a circular list and a node within that list and returns the previous element in the list. An example call is the following:

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

the returned list will contain:

5

Code

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

secondlife/circular_double_linked_lists/node/previous.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.