Function composition in Haskell with tuple arguments [duplicate]
问题 This question already has answers here : Feed elements of a tuple to a function as arguments in Haskell? (3 answers) Closed 4 years ago . Sometimes I have two functions of the form: f :: a -> (b1,b2) h :: b1 -> b2 -> c and I need the composition g. I solve this by changing h to h': h' :: (b1,b2) -> c Can you please show me (if possible) a function m, so that: (h . m . f) == (h' . f) Or another way to deal with such situations. Thanks. 回答1: What you're looking to do is to take a function that