Will the following do what you wish?

add :: Int -> Int -> Int
add x y = x + y

addends = [3,5,7,3,5,8]::[Int]

-- P for predicate
addPs :: (Int -> Bool) -> [Int] -> [Int -> Int]
addPs predicate addends = map add (filter predicate addends)

kP :: [Int]
kP = map (\ f -> f 10 ) (addPs (3==) addends)

--
Regards,
Casey
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to