use circular buffer for Last/DropLast (reduces allocations); move to separate file