resolve = (dirname = __dirname) => (file, parent) => {
  const root = parent ? path.dirname(parent) : dirname;
  return path.resolve(root, file.slice(-5) === ".walt" ? file : file + ".walt");
}
Link Walt programs together.

@param {String} filepath The full path to the index file
@param {Object} options  Reserved
@param {Object} api      Custom compiler. Is the node module by default.

                         This is here to allow for the compiler to test itself
                         during development. It's a simple object which has the
                         collection of functions which make up the entire compiler.
                         This is useful for any sort of diagnostics you'd like to
                         run while linking modules as well.

@return {Function} The build function which takes an importsObj and returns a {Promise}