I need a function with following attributes.
(c->d)->(a->b->c)->a->b->d
my function:
funktionD = (.) . (.)
but :t funktionD
funktionD :: (a -> b) -> (c -> d -> a) -> c -> d -> b
ist this equal?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is. Type variables–written in lowercase–are just that, variables. You can rename them all you like as long as the pattern of which are the same variable stays the same.
Furthermore, for essentially the same reason, for the type signature you gave there is only one possible function of that type (excluding functions that crash or go into infinite loops, that is). Something to think about!