Is there a better way to express (\(a, b) -> a < b) with function composition? I feel like I’m missing something and experimenting with curry only confused me more.
Is there a better way to express (\(a, b) -> a < b) with
Share
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.
curryis the wrong thing to use here; it turns a function operating on tuples into a curried function. You want the opposite, which isuncurry:In this case, it’s
uncurry (<).(Another useful source for combinators useful in writing functions on tuples is
Control.Arrow; since(->)is an instance ofArrow, you can reada b casb -> c.)