yeah problem is that you need .valueatindex(purge) instead of simply purge.
But this is a very bad idea with lists as it will have to go step by step through the list even with an index. convert it to array (arrayfromlist) first and do index based operation on an array
But this is a very bad idea with lists as it will have to go step by step through the list even with an index. convert it to array (arrayfromlist) first and do index based operation on an array