Skip to content

Commit

Permalink
rename dict to ht
Browse files Browse the repository at this point in the history
  • Loading branch information
steveyen committed Sep 13, 2010
1 parent 635bab7 commit 75f345b
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions main.js
Expand Up @@ -23,15 +23,15 @@ var mc_port = 11299;

// ----------------------------------------------------

function mkItems() {
var dict = {};
function mkItems_ht() {
var ht = {};
var truth = function() { return true; };

return {
lookup: function(k) { return dict[k]; },
upsert: function(k, v) { dict[k] = v; },
remove: function(k) { delete dict[k]; },
reset: function() { dict = {}; },
lookup: function(k) { return ht[k]; },
upsert: function(k, v) { ht[k] = v; },
remove: function(k) { delete ht[k]; },
reset: function() { ht = {}; },
range: function(startKey,
startInclusion,
endKey,
Expand All @@ -51,7 +51,7 @@ function mkItems() {
(function(k) { return k < endKey })) :
truth;

for (var k in dict) {
for (var k in ht) {
if (startPredicate(k) && endPredicate(k)) {
if (visitorFunc(k) == false) {
break;
Expand All @@ -62,7 +62,9 @@ function mkItems() {
};
}

var items = mkItems();
// ----------------------------------------------------

var items = mkItems_ht();
var nitems = 0;

var stats = {
Expand Down

0 comments on commit 75f345b

Please sign in to comment.