Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* render */(function (self) {
var state = self[/* state */1];
var numRows = state ? Caml_primitive.caml_int_min(Caml_primitive.caml_int_max(state[0] + 2 | 0, 6), 16) : 6;
var numCols = state ? Caml_primitive.caml_int_min(Caml_primitive.caml_int_max(state[1] + 2 | 0, 6), 16) : 6;
var rows = $$Array.of_list(ListUtils$CourseEditor.range(1, numRows));
var cols = $$Array.of_list(ListUtils$CourseEditor.range(1, numCols));
var width = String(Caml_int32.imul(cols.length, 19) + 10 | 0) + "px";
var height = String(Caml_int32.imul(rows.length, 28) + 50 | 0) + "px";
var gridStyle = {
height: height,
padding: "0px",
width: width
};
var labelStyle = {
color: "#808080",
textAlign: "center",
width: width
};
var isHighlighted = function (row, col) {
if (state && state[0] >= row) {
return state[1] >= col;
} else {
/* render */(function (self) {
var state = self[/* state */1];
var numRows = state ? Caml_primitive.caml_int_min(Caml_primitive.caml_int_max(state[0] + 2 | 0, 6), 16) : 6;
var numCols = state ? Caml_primitive.caml_int_min(Caml_primitive.caml_int_max(state[1] + 2 | 0, 6), 16) : 6;
var rows = $$Array.of_list(ListUtils$CourseEditor.range(1, numRows));
var cols = $$Array.of_list(ListUtils$CourseEditor.range(1, numCols));
var width = String(Caml_int32.imul(cols.length, 19) + 10 | 0) + "px";
var height = String(Caml_int32.imul(rows.length, 28) + 50 | 0) + "px";
var gridStyle = {
height: height,
padding: "0px",
width: width
};
var labelStyle = {
color: "#808080",
textAlign: "center",
width: width
};
var isHighlighted = function (row, col) {
if (state && state[0] >= row) {
return state[1] >= col;
if (variant >= -654604135) {
if (variant >= 258787964) {
if (variant >= 629889314) {
return undefined;
} else {
return value[1];
}
} else if (variant >= -483181849) {
return structToDict(value[1]);
} else {
return null;
}
} else if (variant !== -769490512) {
return value[1];
} else {
return $$Array.of_list(List.map(valueToT, value[1]));
}
}
function suggest_2(funcs, input1, input2, output) {
return $$Array.of_list(List.map((function (prim) {
return prim[1];
}), List.filter((function (param) {
return +(Curry._2(param[0], input1, input2) === output);
}))(funcs)));
}
function suggest_3(funcs, input1, input2, input3, output) {
return $$Array.of_list(List.map((function (prim) {
return prim[1];
}), List.filter((function (param) {
return +(Curry._3(param[0], input1, input2, input3) === output);
}))(funcs)));
}
function suggest_1(funcs, input, output) {
return $$Array.of_list(List.map((function (prim) {
return prim[1];
}), List.filter((function (param) {
return +(Curry._1(param[0], input) === output);
}))(funcs)));
}