// Generated by ReScript, PLEASE EDIT WITH CARE

import * as Belt_List from "@rescript/runtime/lib/es6/Belt_List.mjs";

function fib(x) {
  if (x !== 2 && x !== 1) {
    return fib(x - 1 | 0) + fib(x - 2 | 0) | 0;
  } else {
    return 1;
  }
}

function cons(x, y) {
  return {
    TAG: "Cons",
    _0: x,
    _1: y
  };
}

function map(f, x) {
  if (typeof x !== "object") {
    return "Nil";
  } else {
    return {
      TAG: "Cons",
      _0: f(x._0),
      _1: map(f, x._1)
    };
  }
}

function sum(n) {
  let v = 0;
  for (let i = 0; i <= n; ++i) {
    v = v + i | 0;
  }
  return v;
}

function f(x, y, z) {
  return (x + y | 0) + z | 0;
}

function g(x, y) {
  let u = x + y | 0;
  return z => u + z | 0;
}

function g1(x, y) {
  let u = x + y | 0;
  return (xx, yy) => (xx + yy | 0) + u | 0;
}

let u = 8;

let x = u + 6 | 0;

function v(extra) {
  let u = 7;
  return (6 + extra | 0) + u | 0;
}

let nil = "Nil";

let len = Belt_List.length;

export {
  fib,
  nil,
  cons,
  map,
  sum,
  len,
  f,
  g,
  g1,
  x,
  v,
}
/* No side effect */
