How to use the bs-platform/lib/js/array.js.of_list function in bs-platform

To help you get started, we’ve selected a few bs-platform examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Simon-Initiative / authoring-client / src / editors / content / learning / table / TableCreation.bs.js View on Github external
/* 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 {
github Simon-Initiative / authoring-client / src / editors / content / learning / table / TableCreation.bs.js View on Github external
/* 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;
github nars-dev / nars / packages / nars / src / JsValue.bs.js View on Github external
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]));
  }
}
github GuillaumeSalles / resuggest / src / generated / functions.js View on Github external
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)));
}
github GuillaumeSalles / resuggest / src / generated / functions.js View on Github external
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)));
}
github GuillaumeSalles / resuggest / src / generated / functions.js View on Github external
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)));
}