Nico Rolle <nro...@web.de> writes: > A function is recieving a lambda expression like this: > (\ x y -> x > y) > or like this > (\ x y z a -> (x > y) && (z < a)
And the type of that function is..? > my problem is now i know i have a list filled with the parameters for > the lambda expression. but how can i call that expression? > [parameters] is my list of parameters for the lambda expression. > lambda_ex is my lambda expression Would this work? data LambdaExpr a = L0 a | L1 (a -> a) | L2 (a -> a -> a) | ... apply :: LambdaExpr a -> [a] -> a apply (L0 x) _ = x apply (L1 f) (x:_) = f x apply (L2 f) (x1:x2:_) = f x1 s2 : -k -- If I haven't seen further, it is by standing in the footprints of giants _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe