oleiade / lane

Generic PriorityQueues, Queues, Stacks, and Deque data structures for Go
https://pkg.go.dev/github.com/oleiade/lane#pkg-types
MIT License
878 stars 76 forks source link

Add capacity-limited Deque #4

Closed johnsto closed 10 years ago

johnsto commented 10 years ago

Small change to allow creation of deques that are of limited capacity. Append/Prepend functions return booleans indicating success.

oleiade commented 10 years ago

Thank you very much for this.

I need to think about it a bit, I'll keep you up to date :)

oleiade commented 10 years ago

Okay this looks pretty good actually.

Two or three things though:

Thank you very much!

johnsto commented 10 years ago

Renamed the function as suggested, also added an example to readme.

Travis CI looked like it just needed a .travis.yml file, so added that and it appears to be happy again.

oleiade commented 10 years ago

Looks really great. Thank you very much for this! I think I will add this behavior to the Stack, Queue and PriorityQueue too. Merging.