From de9142f4bae5a3d1c1324097937e82cd01429045 Mon Sep 17 00:00:00 2001 From: Stevie Strickland Date: Sat, 21 Jun 2008 21:09:03 -0400 Subject: [PATCH] Let's also try out the abstracted version of this function. original commit: e4a0dc82b3753641b0da838e393d7ff453ca37c9 --- collects/tests/typed-scheme/succeed/unholy-terror.ss | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/collects/tests/typed-scheme/succeed/unholy-terror.ss b/collects/tests/typed-scheme/succeed/unholy-terror.ss index 04de86c2..1abdcc3a 100644 --- a/collects/tests/typed-scheme/succeed/unholy-terror.ss +++ b/collects/tests/typed-scheme/succeed/unholy-terror.ss @@ -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))) - + - * /) \ No newline at end of file + + - * /) + +(: 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 + - * /) \ No newline at end of file