lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

>(Lua authors: any chance of implementing lua_rotate()?
>Like the postscript operator rot)

(You mean "roll", right?)

lua_insert(L,n) is a rotation: it takes the top element and puts it at position
n, pushing everything in between

lua_pushvalue(L,n)+lua_remove(L,n) does a rotation in the other direction.

Do you really miss more general rotations?