From 42527dd61e95fc1000f00ed13e03107c511d324c Mon Sep 17 00:00:00 2001 From: Nocturn9x Date: Wed, 16 Mar 2022 14:11:58 +0100 Subject: [PATCH] Changes to README --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ed818a0..ccfb961 100644 --- a/README.md +++ b/README.md @@ -33,9 +33,9 @@ queue.addLeft(-2) queue.pop() # Pops and returns the last element in O(1) time -discard queue.pop(queue.high()) +echo queue.pop(queue.high()) # This can also be written as -discard queue.pop(^1) +echo queue.pop(^1) # Pops element at position n discard queue.pop(n) @@ -49,8 +49,8 @@ for e in queue.reversed(): echo e echo queue.len() -5 in queue # false -0 in queue # true +echo 5 in queue # false +echo 0 in queue # true # Item accessing works just like regular sequence types in Nim. # Note that the further the item is from either end of the @@ -106,10 +106,11 @@ some benchmarks as well as the test suite used to validate the behavior of the q ## Why? There's std/deques! 1. I was bored during my programming class -2. That only provides a deque based on `seq`s -3. The deque in that module is a value type +2. std/deques only provides a deque based on `seq`s +3. The deque in std/deques is a value type 4. The deques in this module allow accessing at arbirary locations -5. More useful procs are implemented +5. More useful procs are implemented (`find`, `extend`, `extendLeft`, `reversedPairs`, etc.) +6. The deques in this module can be restrained in size 1. I was bored during my programming class