-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
122 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package core | ||
|
||
type ( | ||
Box struct { | ||
val Object | ||
} | ||
Node interface { | ||
assoc(shift int, hash int, key Object, val Object, addedLeaf Box) Node | ||
without(shift int, hash int, key Object) Node | ||
find(shift int, hash int, key Object) Pair | ||
tryFind(shift int, hash int, key Object, notFound Object) Object | ||
nodeSeq() Seq | ||
kvreduce(f Callable, init Object) Object | ||
fold(combinef Callable, reducef Callable, fjtask Callable, fjfork Callable, fjjoin Callable) Object | ||
} | ||
HashMap struct { | ||
InfoHolder | ||
MetaHolder | ||
count int | ||
root Node | ||
hasNull bool | ||
nullValue Object | ||
} | ||
) | ||
|
||
var EmptyHashMap = &HashMap{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
go generate ./... && go tool vet ./ && go build && ./joker $@ | ||
go generate ./... && go tool vet -shift=false ./ && go build && ./joker $@ |