adt.js
function () {
      var args = arguments;
      var len = names.length;
      if (this instanceof ctr) {
        if (args.length !== len) {
          throw new Error(
            'Unexpected number of arguments for ' + ctr.className + ': ' +
            'got ' + args.length + ', but need ' + len + '.'
          );
        }
        var i = 0, n;
        for (; n = names[i]; i++) {
          this[n] = constraints[n](args[i], n, ctr);
        }
      } else {
        return args.length < len
          ? partial(ctr, toArray(args))
          : ctrApply(ctr, args);
      }
    }
function () {
      var args = arguments;
      var len = names.length;
      if (this instanceof ctr) {
        if (args.length !== len) {
          throw new Error(
            'Unexpected number of arguments for ' + ctr.className + ': ' +
            'got ' + args.length + ', but need ' + len + '.'
          );
        }
        var i = 0, n;
        for (; n = names[i]; i++) {
          this[n] = constraints[n](args[i], n, ctr);
        }
      } else {
        return args.length < len
          ? partial(ctr, toArray(args))
          : ctrApply(ctr, args);
      }
    }
function ( ) { var args = arguments ; var len = names . length ; if ( this instanceof ctr ) { if ( args . length !== len ) { throw new Error ( 'Unexpected number of arguments for ' + ctr . className + ': ' + 'got ' + args . length + ', but need ' + len + '.' ) ; } var i = 0 , n ; for ( ; n = names [ i ] ; i ++ ) { this [ n ] = constraints [ n ] ( args [ i ] , n , ctr ) ; } } else { return args . length < len ? partial ( ctr , toArray ( args ) ) : ctrApply ( ctr , args ) ; } }
A record's constructor can be called without `new` and will also throw an error if called with the wrong number of arguments. Its arguments can be curried as long as it isn't called with the `new` keyword.
A record s constructor can be called without new and will also throw an error if called with the wrong number of arguments . Its arguments can be curried as long as it isn t called with the new keyword .