NetLogo 过滤器是否以与源列表相同的顺序生成结果?

Does NetLogo filter generate the results in the same order as the source list?

我有一个用作 FIFO 队列的列表列表(使用 lput):

set mylist  [[-8.5 0] [1.5 0] [-7.5 1] [0.5 1] [-8.5 2] [1.5 2] [-5.5 3] [2.5 3] [-5.5 4] [2.5 4] [1.5 5] [1.5 6] [-8.5 7] [3.5 7]]

我可以过滤列表,提取第一个位置为 -8.5 的项目:

show filter [item 0 ? = -8.5] mylist

[[-8.5 0] [-8.5 2] [-8.5 7]]

同样,我可以过滤列表,提取第二个位置为 3 的项目:

show filter [item 1 ? = 3] mylist

[[-5.5 3] [2.5 3]]

filter 是否保证结果与原始列表中的结果保持相同的顺序?

是的,列表是有序的,过滤器(和子列表等)保持顺序