looking at error report

This commit is contained in:
Danny Yoo 2011-08-19 14:55:19 -04:00
parent 8ec8f3043c
commit 47d2708f23
4 changed files with 10 additions and 10 deletions

View File

@ -60,7 +60,7 @@
} }
testArgument( testArgument(
MACHINE, MACHINE,
function () { parameterizedPredicateName.apply(null, args); }, function () { return parameterizedPredicateName.apply(null, args); },
function (x) { function (x) {
return parameterizedPredicate.apply(null, [x].concat(args)); return parameterizedPredicate.apply(null, [x].concat(args));
}, },

View File

@ -651,7 +651,7 @@
installPrimitiveProcedure( installPrimitiveProcedure(
'string', 'string',
baselib.arity.arityAtLeast(0), baselib.arity.makeArityAtLeast(0),
function (MACHINE) { function (MACHINE) {
var i; var i;
var chars = []; var chars = [];
@ -666,11 +666,11 @@
'string->list', 'string->list',
1, 1,
function (MACHINE) { function (MACHINE) {
var str = checkString(MACHINE, 'string->list', 0); var str = checkString(MACHINE, 'string->list', 0).toString();
var i; var i;
var result = NULL; var result = NULL;
for (i = 0; i < str.length; i++) { for (i = str.length - 1; i >= 0; i--) {
result = makePair(baselib.chars.makeChar(elts[elts.length - 1 - i]), result); result = makePair(baselib.chars.makeChar(str[i]), result);
} }
return result; return result;
}); });
@ -769,7 +769,7 @@
function (MACHINE) { function (MACHINE) {
var firstArg = checkString(MACHINE, 'string-ref', 0).toString(); var firstArg = checkString(MACHINE, 'string-ref', 0).toString();
var index = baselib.numbers.toFixnum( var index = baselib.numbers.toFixnum(
checkNaturalInRange(MACHINE, 'string-ref', 0, checkNaturalInRange(MACHINE, 'string-ref', 1,
0, firstArg.length)); 0, firstArg.length));
return baselib.chars.makeChar(firstArg[index]); return baselib.chars.makeChar(firstArg[index]);
}); });

View File

@ -390,7 +390,7 @@ symbol->string
vector->list vector->list
list->vector list->vector
;; build-vector ;; build-vector
;; char=? char=?
;; char<? ;; char<?
;; char>? ;; char>?
;; char<=? ;; char<=?

View File

@ -19,6 +19,6 @@
#\e #\e
#\l #\l
#\o #\o
(list #\x #\y #\z) (#\x #\y #\z)
(list #\x) (#\x)
(list) ()