diff --git a/btree/immutable/node.go b/btree/immutable/node.go index 47ad895..ca43d8c 100644 --- a/btree/immutable/node.go +++ b/btree/immutable/node.go @@ -49,7 +49,7 @@ type Key struct { // ID returns the unique identifier. func (k Key) ID() []byte { - return k.UUID[:16] // to maintain backwards compatability + return k.UUID[:16] // to maintain backwards compatibility } func (k Key) ToItem() *Item { diff --git a/btree/plus/btree.go b/btree/plus/btree.go index 4ff365a..83c43bf 100644 --- a/btree/plus/btree.go +++ b/btree/plus/btree.go @@ -16,7 +16,7 @@ limitations under the License. /* Package btree/plus implements the ubiquitous B+ tree. As of this writing, -the tree is not quite finished. The delete-node merge functionaly needs +the tree is not quite finished. The delete-node merge functionally needs to be added. There are also some performance improvements that can be made, with some possible concurrency mechanisms. diff --git a/documentation.md b/documentation.md index 2af657b..1ed6995 100644 --- a/documentation.md +++ b/documentation.md @@ -54,7 +54,7 @@ Although rangetrees are often represented as BBSTs as described above, the n-dim ### Future -Unite both implementations of the rangetree under the same interface. The implementations (especially the immutable one) could use some futher performance optimizations. +Unite both implementations of the rangetree under the same interface. The implementations (especially the immutable one) could use some further performance optimizations. ## Fibonacci Heap diff --git a/futures/selectable.go b/futures/selectable.go index 414a612..b9d638a 100644 --- a/futures/selectable.go +++ b/futures/selectable.go @@ -56,7 +56,7 @@ func (f *Selectable) wchan() <-chan struct{} { return ch } -// WaitChan returns channel, which is closed when future is fullfilled. +// WaitChan returns channel, which is closed when future is fulfilled. func (f *Selectable) WaitChan() <-chan struct{} { if atomic.LoadUint32(&f.filled) == 1 { return closed @@ -64,7 +64,7 @@ func (f *Selectable) WaitChan() <-chan struct{} { return f.wchan() } -// GetResult waits for future to be fullfilled and returns value or error, +// GetResult waits for future to be fulfilled and returns value or error, // whatever is set first func (f *Selectable) GetResult() (interface{}, error) { if atomic.LoadUint32(&f.filled) == 0 { @@ -73,7 +73,7 @@ func (f *Selectable) GetResult() (interface{}, error) { return f.val, f.err } -// Fill sets value for future, if it were not already fullfilled +// Fill sets value for future, if it were not already fulfilled // Returns error, if it were already set to future. func (f *Selectable) Fill(v interface{}, e error) error { f.m.Lock() diff --git a/queue/queue.go b/queue/queue.go index bb50f2a..c577023 100644 --- a/queue/queue.go +++ b/queue/queue.go @@ -33,7 +33,7 @@ Modified for use with Go with the addition of some dispose semantics providing the capability to release blocked threads. This works for both puts and gets, either will return an error if they are blocked and the buffer is disposed. This could serve as a signal to kill a goroutine. All threadsafety -is acheived using CAS operations, making this buffer pretty quick. +is achieved using CAS operations, making this buffer pretty quick. Benchmarks: BenchmarkPriorityQueue-8 2000000 782 ns/op diff --git a/set/dict.go b/set/dict.go index c78f5c4..db57123 100644 --- a/set/dict.go +++ b/set/dict.go @@ -22,7 +22,7 @@ TODO: Actually write custom hashmap using the hash/fnv hasher. TODO: Our Set implementation Could be further optimized by getting the uintptr of the generic interface{} used and using that as the key; Golang maps handle -uintptr much better than the generic interace{} key. +uintptr much better than the generic interface{} key. */ package set @@ -146,7 +146,7 @@ func New(items ...interface{}) *Set { for _, item := range items { set.items[item] = struct{}{} } - + if len(items) > 0 { set.flattened = nil } diff --git a/slice/skip/skip.go b/slice/skip/skip.go index d509ee4..c6cb49f 100644 --- a/slice/skip/skip.go +++ b/slice/skip/skip.go @@ -27,7 +27,7 @@ Delete: O(log n) Space: O(n) Recently added is the capability to address, insert, and replace an -entry by position. This capability is acheived by saving the width +entry by position. This capability is achieved by saving the width of the "gap" between two nodes. Searching for an item by position is very similar to searching by value in that the same basic algorithm is used but we are searching for width instead of value. Because this avoids diff --git a/tree/avl/avl.go b/tree/avl/avl.go index b3b349a..daab480 100644 --- a/tree/avl/avl.go +++ b/tree/avl/avl.go @@ -34,7 +34,7 @@ package avl import "math" -// Immutable represents an immutable AVL tree. This is acheived +// Immutable represents an immutable AVL tree. This is achieved // by branch copying. type Immutable struct { root *node diff --git a/trie/yfast/yfast.go b/trie/yfast/yfast.go index e937cc5..2fe6088 100644 --- a/trie/yfast/yfast.go +++ b/trie/yfast/yfast.go @@ -237,7 +237,7 @@ func (yfast *YFastTrie) predecessor(key uint64) Entry { } // Predecessor returns an Entry with a key equal to or immediately -// preceeding than the provided key. If such an Entry does not exist +// preceding than the provided key. If such an Entry does not exist // this returns nil. func (yfast *YFastTrie) Predecessor(key uint64) Entry { entry := yfast.predecessor(key)