Circular Buffer

Jonathan Dunlap jadit2 at gmail.com
Sun Feb 9 19:14:29 PST 2014


(disclaimer: I'm new around here)
Is it possible to cycle backwards? If not, what's the best 
approach?

Example of some ideal "takeBack" function:
data = cycle([1,2,3][])
take(data, 4) is [1,2,3,1][]
takeBack(data, 4) would be [1,3,2,1][]

Thoughts?


More information about the Digitalmars-d-learn mailing list