code: function(constructorFunction) {
      if(!constructorFunction) throw new Error('Constructor function argument must be non-null function');
  
      var Structure = function() {
        if(!(this instanceof Structure)) {
          var instance = new Structure();
          constructorFunction.apply(instance, arguments);
          return instance;
        }
        constructorFunction.apply(this, arguments);
      };
  
      return Structure;
    }
docs: Constructor
  
  Constructs a structure based on the supplied constructor function.
  An Error is thrown should no constructor function be supplied.