I'm not sure what you're trying to tell me, so let's try a specific case.
Here's the makeVerifier function that expects its function f to have a single arg, a pair (i,d):
makeVerifier :: ((Int,Int) -> Int) -> Int -> (Int -> Bool)
makeVerifier f m = divides m . foldl (+) 0 . map f . zip [1 .. ] . digits
And usage:
let checkCc = makeVerifier (\ (i d) -> if odd i then d else if d < 5 then 2*d else 2*d + 1) 10
And here's the old makeVerifier function that expects its function f to have two integer arguments, i & d:
makeVerifier :: (Int -> Int -> Int) -> Int -> (Int -> Bool)
makeVerifier f m = divides m . foldl (+) 0 . zipWith f [1 .. ] . digits
And usage:
let checkCc = makeVerifier (\ ....    <== Complete this  ) 10
Michael
--- On Sun, 4/12/09, Ross Mellgren 
Example please.
Michael
Curried: f :: a -> b -> c amenable to partial application. Uncurried: g :: (a,b) -> c not easy to apply partially. The Prelude contains curry :: ((a,b) -> c) -> (a -> b -> c) uncurry :: (a -> b -> c) -> ((a,b) -> c) to convert if needed. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe