time-to-botec/squiggle/node_modules/@rescript/std/lib/js/hashtblLabels.js
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

169 lines
4.0 KiB
JavaScript

'use strict';
var Curry = require("./curry.js");
var Hashtbl = require("./hashtbl.js");
var add = Hashtbl.add;
var replace = Hashtbl.replace;
function iter(f, tbl) {
Hashtbl.iter(Curry.__2(f), tbl);
}
function filter_map_inplace(f, tbl) {
Hashtbl.filter_map_inplace(Curry.__2(f), tbl);
}
function fold(f, tbl, init) {
return Hashtbl.fold(Curry.__3(f), tbl, init);
}
function MakeSeeded(H) {
var include = Hashtbl.MakeSeeded(H);
var add = include.add;
var replace = include.replace;
var iter = include.iter;
var filter_map_inplace = include.filter_map_inplace;
var fold = include.fold;
var add$1 = Curry.__3(add);
var replace$1 = Curry.__3(replace);
var iter$1 = function (f, tbl) {
Curry._2(iter, Curry.__2(f), tbl);
};
var filter_map_inplace$1 = function (f, tbl) {
Curry._2(filter_map_inplace, Curry.__2(f), tbl);
};
var fold$1 = function (f, tbl, init) {
return Curry._3(fold, Curry.__3(f), tbl, init);
};
return {
create: include.create,
clear: include.clear,
reset: include.reset,
copy: include.copy,
add: add$1,
remove: include.remove,
find: include.find,
find_opt: include.find_opt,
find_all: include.find_all,
replace: replace$1,
mem: include.mem,
iter: iter$1,
filter_map_inplace: filter_map_inplace$1,
fold: fold$1,
length: include.length,
stats: include.stats
};
}
function Make(H) {
var hash = function (_seed, x) {
return Curry._1(H.hash, x);
};
var H_equal = H.equal;
var H$1 = {
equal: H_equal,
hash: hash
};
var include = Hashtbl.MakeSeeded(H$1);
var create = include.create;
var add = include.add;
var replace = include.replace;
var iter = include.iter;
var filter_map_inplace = include.filter_map_inplace;
var fold = include.fold;
var add$1 = Curry.__3(add);
var replace$1 = Curry.__3(replace);
var iter$1 = function (f, tbl) {
Curry._2(iter, Curry.__2(f), tbl);
};
var filter_map_inplace$1 = function (f, tbl) {
Curry._2(filter_map_inplace, Curry.__2(f), tbl);
};
var fold$1 = function (f, tbl, init) {
return Curry._3(fold, Curry.__3(f), tbl, init);
};
var create$1 = function (sz) {
return Curry._2(create, false, sz);
};
return {
create: create$1,
clear: include.clear,
reset: include.reset,
copy: include.copy,
add: add$1,
remove: include.remove,
find: include.find,
find_opt: include.find_opt,
find_all: include.find_all,
replace: replace$1,
mem: include.mem,
iter: iter$1,
filter_map_inplace: filter_map_inplace$1,
fold: fold$1,
length: include.length,
stats: include.stats
};
}
var create = Hashtbl.create;
var clear = Hashtbl.clear;
var reset = Hashtbl.reset;
var copy = Hashtbl.copy;
var find = Hashtbl.find;
var find_opt = Hashtbl.find_opt;
var find_all = Hashtbl.find_all;
var mem = Hashtbl.mem;
var remove = Hashtbl.remove;
var length = Hashtbl.length;
var randomize = Hashtbl.randomize;
var is_randomized = Hashtbl.is_randomized;
var stats = Hashtbl.stats;
var hash = Hashtbl.hash;
var seeded_hash = Hashtbl.seeded_hash;
var hash_param = Hashtbl.hash_param;
var seeded_hash_param = Hashtbl.seeded_hash_param;
exports.create = create;
exports.clear = clear;
exports.reset = reset;
exports.copy = copy;
exports.find = find;
exports.find_opt = find_opt;
exports.find_all = find_all;
exports.mem = mem;
exports.remove = remove;
exports.length = length;
exports.randomize = randomize;
exports.is_randomized = is_randomized;
exports.stats = stats;
exports.hash = hash;
exports.seeded_hash = seeded_hash;
exports.hash_param = hash_param;
exports.seeded_hash_param = seeded_hash_param;
exports.add = add;
exports.replace = replace;
exports.iter = iter;
exports.filter_map_inplace = filter_map_inplace;
exports.fold = fold;
exports.MakeSeeded = MakeSeeded;
exports.Make = Make;
/* No side effect */