Change map* to map.
This commit is contained in:
parent
27073e07fd
commit
a43b2f5681
|
@ -2,15 +2,15 @@
|
||||||
|
|
||||||
(require typed-scheme/private/extra-procs)
|
(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.
|
;; Arity mismatch.
|
||||||
(: g (Integer Integer Integer -> Integer))
|
(: g (Integer Integer Integer -> Integer))
|
||||||
(define (g x y z) 0)
|
(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))
|
(: h (Integer Integer Integer * -> Integer))
|
||||||
(define (h x y . z) 0)
|
(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))
|
(: f (Integer Integer -> Integer))
|
||||||
(define (f x y) (+ x y))
|
(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))
|
(: h (Integer Integer Integer * -> Integer))
|
||||||
(define (h x y . z) (apply + (cons x (cons y z))))
|
(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))
|
||||||
(map* h (list 1 2 3) (list 4 5 6) (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