从列表中删除第一项的最快方法是什么?

use*_*395 0 applescript

我读到了有关list使用一些快速操作的信息as a reference,如此处所解释

从列表中删除第一项的最快方法是什么(也许使用as a referencerest of list)?

例如:

{3,5,6,2,8}

变成

{5,6,2,8}

wch*_*ink 6

这将从列表中删除第一项

set theList to rest of {3, 5, 6, 2, 8}
Run Code Online (Sandbox Code Playgroud)

返回 {5, 6, 2, 8}


或者,这将从列表中删除最后一项

set theList to reverse of rest of reverse of {3, 5, 6, 2, 8}
Run Code Online (Sandbox Code Playgroud)

返回 {3, 5, 6, 2}