Skip to content

fix some typos #224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion btree/immutable/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion btree/plus/btree.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions futures/selectable.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ 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
}
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 {
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion queue/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions set/dict.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -146,7 +146,7 @@ func New(items ...interface{}) *Set {
for _, item := range items {
set.items[item] = struct{}{}
}

if len(items) > 0 {
set.flattened = nil
}
Expand Down
2 changes: 1 addition & 1 deletion slice/skip/skip.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tree/avl/avl.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion trie/yfast/yfast.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down