local function _0_(f, g)
  local function _1_(x)
    return f(g(x))
  end
  return _1_
end
comp = _0_
local function _1_(f, g)
  local function _2_(x)
    f(x)
    return g(x)
  end
  return _2_
end
andthen = _1_
local function _2_(f, l)
  local res = {}
  for key, val in pairs(l) do
    res[key] = f(val)
  end
  return res
end
map = _2_
local function _3_(f, l)
  local res = {}
  for key, val in ipairs(l) do
    res[key] = f(key, val)
  end
  return res
end
imap = _3_
local function _4_(f, l)
  for _, x in pairs(l) do
    f(x)
  end
  return nil
end
foreach = _4_
local function _5_(f, l)
  for id, x in ipairs(l) do
    f(id, x)
  end
  return nil
end
iforeach = _5_
local function _6_(f, l)
  for key, value in pairs(l) do
    f(key, value)
  end
  return nil
end
foreach2 = _6_
local function _7_(t_e2_82_80)
  local t = {}
  for k, v in pairs(t_e2_82_80) do
    t[k] = v
  end
  return t
end
copy = _7_
local function _8_(x)
  local function _9_(...)
    return x
  end
  return _9_
end
const = _8_
local function _9_(str, start)
  return (str:sub(1, #start) == start)
end
starts_with = _9_
local function _10_(str, ending)
  return ((ending == "") or (str:sub(( - #ending)) == ending))
end
ends_with = _10_
local function _11_(pos, name)
  local node = minetest.get_node(pos)
  if (node.name ~= name) then
    node["name"] = name
    return minetest.swap_node(pos, node)
  end
end
swap_node = _11_
local function _12_(inv, listname, stack, pos)
  if inv:room_for_item(listname, stack) then
    return inv:add_item(listname, stack)
  else
    return minetest.add_item(pos, stack)
  end
end
add_or_drop = _12_
local function _13_(dest, source)
  for _, x in ipairs(source) do
    table.insert(dest, x)
  end
  return nil
end
append = _13_
local function _14_(str)
  return string.gsub(str:gsub("^%l", string.upper), "_", " ")
end
capitalization = _14_
local function _15_(lst_e2_82_81, lst_e2_82_82)
  local res = {}
  for id, x in pairs(lst_e2_82_81) do
    res[id] = x
  end
  for id, y in pairs(lst_e2_82_82) do
    res[id] = y
  end
  return res
end
union = _15_
local function _16_(sep, ...)
  return table.concat({...}, sep)
end
join = _16_
i = vector.new(1, 0, 0)
j = vector.new(0, 0, 1)
k = vector.new(0, 1, 0)
local function _17_(pos)
  return vector.add(pos, k)
end
above = _17_
local function _18_(pos)
  return vector.subtract(pos, k)
end
under = _18_
local function _19_(mod, ...)
  local modpath = minetest.get_modpath(mod)
  local get_path = nil
  local function _20_(name)
    return (modpath .. "/" .. name .. ".lua")
  end
  get_path = _20_
  return foreach(comp(dofile, get_path), {...})
end
import = _19_
local function gen_ordered_index(t)
  local ordered_index = {}
  for key, _ in pairs(t) do
    table.insert(ordered_index, key)
  end
  table.sort(ordered_index)
  return ordered_index
end
local function _20_(t, state)
  local key = nil
  if (state == nil) then
    t["ordered-index"] = gen_ordered_index(t)
    key = t["ordered-index"][1]
  else
    for i0 = 1, #t["ordered-index"] do
      if (t["ordered-index"][i0] == state) then
        key = t["ordered-index"][(i0 + 1)]
      end
    end
  end
  if key then
    return key, t[key]
  else
    t["ordered-index"] = nil
    return nil
  end
end
onext = _20_
local function _21_(t)
  return onext, t, nil
end
opairs = _21_
local function _22_(x, y)
  return (x + y)
end
plus = _22_
local function _23_(x, y)
  return (x - y)
end
minus = _23_
local function _24_(i_e2_82_98_e2_82_90_e2_82_93)
  local res = {}
  for i0 = 1, i_e2_82_98_e2_82_90_e2_82_93 do
    table.insert(res, i0)
  end
  return res
end
range = _24_
return nil
