Let's also try out the abstracted version of this function.

This commit is contained in:
Stevie Strickland 2008-06-21 21:09:03 -04:00
parent 48961eb551
commit e4a0dc82b3

View File

@ -1,6 +1,5 @@
#lang typed-scheme
(apply (plambda: (a ...) [ys : (a ... a -> Number) *]
(lambda: [zs : a ... a]
(map (lambda: ([y : (a ... a -> Number)])
@ -55,4 +54,12 @@
(map (lambda: ([y : (a ... a -> Number)])
(apply y zs))
ys)))
+ - * /)
+ - * /)
(: map-with-funcs (All (b a ...) ((a ... a -> b) * -> (a ... a -> (Listof b)))))
(define (map-with-funcs . fs)
(lambda as
(map (lambda: ([f : (a ... a -> b)])
(apply f as))
fs)))
(map-with-funcs + - * /)