code: function(val) {
      let guid = guidFor(val);
      if(guid in map) {
        return map[guid];
      } else if(sort) {
        let sibiling = calculateMissingPosition(val, domain, sort);
        return map[guidFor(sibiling)];
      } else {
        return r0;
      }
    }
docs: Create the closure that will return the matched value.