diff --git a/js-assembler/runtime-src/baselib-arity.js b/js-assembler/runtime-src/baselib-arity.js index 3fc80d7..1d3aa17 100644 --- a/js-assembler/runtime-src/baselib-arity.js +++ b/js-assembler/runtime-src/baselib-arity.js @@ -41,7 +41,7 @@ while (arity !== baselib.lists.EMPTY) { if (typeof(arity.first) === 'number') { if (arity.first === n) { return true; } - } else if (isArityAtLeast(arity)) { + } else if (isArityAtLeast(arity.first)) { if (n >= arityAtLeastValue(arity.first)) { return true; } } arity = arity.rest; diff --git a/js-assembler/runtime-src/runtime.js b/js-assembler/runtime-src/runtime.js index 2466d16..94d584b 100644 --- a/js-assembler/runtime-src/runtime.js +++ b/js-assembler/runtime-src/runtime.js @@ -222,6 +222,9 @@ this.mainModules = []; // Arrayof String this.params = { + // print-as-expression: boolean + 'print-as-expression' : true, + // currentDisplayer: DomNode -> Void // currentDisplayer is responsible for displaying to the browser. 'currentDisplayer': function(MACHINE, domNode) { diff --git a/tests/more-tests/map.expected b/tests/more-tests/map.expected new file mode 100644 index 0000000..5938c3c --- /dev/null +++ b/tests/more-tests/map.expected @@ -0,0 +1,4 @@ +(5 7 9) +(5 7 9) +(12 15 18) +(1 2 3) diff --git a/tests/more-tests/map.rkt b/tests/more-tests/map.rkt index 1c1552e..45ebce8 100644 --- a/tests/more-tests/map.rkt +++ b/tests/more-tests/map.rkt @@ -1,2 +1,6 @@ #lang planet dyoo/whalesong + (map (lambda (x y) (+ x y)) (list 1 2 3) (list 4 5 6)) +(map + (list 1 2 3) (list 4 5 6)) +(map + (list 1 2 3) (list 4 5 6) (list 7 8 9)) +(map + (list 1 2 3)) diff --git a/tests/run-more-tests.rkt b/tests/run-more-tests.rkt index 9a79ce7..7f48372 100644 --- a/tests/run-more-tests.rkt +++ b/tests/run-more-tests.rkt @@ -14,6 +14,7 @@ (test "more-tests/hello.rkt") (test "more-tests/sharing.rkt") (test "more-tests/simple-functions.rkt") +(test "more-tests/map.rkt") (test "more-tests/quasi.rkt") (test "more-tests/sk-generator.rkt") (test "more-tests/sk-generator-2.rkt")