3 function pv (x) { return x==undefined? nil: x; }
7 r['multiple-value'] = true;
8 for (var i=0; i<arguments.length; i++)
13 // NOTE: Define VALUES to be MV for toplevel forms. It is because
14 // `eval' compiles the forms and execute the Javascript code at
15 // toplevel with `js-eval', so it is necessary to return multiple
16 // values from the eval function.
19 function checkArgsAtLeast(args, n){
20 if (args.length < n) throw 'too few arguments';
23 function checkArgsAtMost(args, n){
24 if (args.length > n) throw 'too many arguments';
27 function checkArgs(args, n){
28 checkArgsAtLeast(args, n);
29 checkArgsAtMost(args, n);
32 // Improper list constructor (like LIST*)
34 if (arguments.length == 1)
37 var i = arguments.length-1;
38 var r = arguments[i--];
40 r = {car: arguments[i], cdr: r};