fix for checking procedure arity. Thanks to Jens for the bug report.

This commit is contained in:
Danny Yoo 2011-09-19 12:01:34 -04:00
parent f26355494b
commit 23bd9eb999
5 changed files with 13 additions and 1 deletions

View File

@ -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;

View File

@ -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) {

View File

@ -0,0 +1,4 @@
(5 7 9)
(5 7 9)
(12 15 18)
(1 2 3)

View File

@ -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))

View File

@ -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")