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

original commit: e4a0dc82b3753641b0da838e393d7ff453ca37c9
This commit is contained in:
Stevie Strickland 2008-06-21 21:09:03 -04:00
parent 16df4ac649
commit de9142f4ba

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 + - * /)