Change map* to map.
original commit: a43b2f5681c576e9b22ff7926ca48ddacfcbcfc2
This commit is contained in:
parent
286e9b8510
commit
2afa0ac8f1
|
@ -2,15 +2,15 @@
|
|||
|
||||
(require typed-scheme/private/extra-procs)
|
||||
|
||||
(map* + (list 1 2 3) (list 10 20 30) (list 'a 'b 'c))
|
||||
(map + (list 1 2 3) (list 10 20 30) (list 'a 'b 'c))
|
||||
|
||||
;; Arity mismatch.
|
||||
(: g (Integer Integer Integer -> Integer))
|
||||
(define (g x y z) 0)
|
||||
|
||||
(map* g (list 1 2 3) (list 4 5 6))
|
||||
(map g (list 1 2 3) (list 4 5 6))
|
||||
|
||||
(: h (Integer Integer Integer * -> Integer))
|
||||
(define (h x y . z) 0)
|
||||
|
||||
(map* h (list 1 2 3))
|
||||
(map h (list 1 2 3))
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
(: f (Integer Integer -> Integer))
|
||||
(define (f x y) (+ x y))
|
||||
|
||||
(map* f (list 1 2 3) (list 10 20 30))
|
||||
(map f (list 1 2 3) (list 10 20 30))
|
||||
|
||||
(map* + (list 1 2 3) (list 10 20 30) (list 10 20 30))
|
||||
(map + (list 1 2 3) (list 10 20 30) (list 10 20 30))
|
||||
|
||||
(map* + (list 1 2 3) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30))
|
||||
(map + (list 1 2 3) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30))
|
||||
|
||||
(: h (Integer Integer Integer * -> Integer))
|
||||
(define (h x y . z) (apply + (cons x (cons y z))))
|
||||
|
||||
(map* h (list 1 2 3) (list 4 5 6))
|
||||
(map* h (list 1 2 3) (list 4 5 6) (list 4 5 6))
|
||||
(map h (list 1 2 3) (list 4 5 6))
|
||||
(map h (list 1 2 3) (list 4 5 6) (list 4 5 6))
|
||||
|
|
Loading…
Reference in New Issue
Block a user