为啥commonlisp习惯用push nreverse

我想大概是因为列表是单向的,如果每次都在尾部追加元素,要么每次都遍历一遍列表,要么动态存储列表尾部的位置,对于小规模数据,列表的push nreverse的方式是可接受的。

你可能感兴趣的:(为啥commonlisp习惯用push nreverse)