fix for checking procedure arity. Thanks to Jens for the bug report.
This commit is contained in:
parent
f26355494b
commit
23bd9eb999
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
4
tests/more-tests/map.expected
Normal file
4
tests/more-tests/map.expected
Normal file
|
@ -0,0 +1,4 @@
|
|||
(5 7 9)
|
||||
(5 7 9)
|
||||
(12 15 18)
|
||||
(1 2 3)
|
|
@ -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))
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue
Block a user