Ordering of parameters to make use of currying
问题 I have twice recently refactored code in order to change the order of parameters because there was too much code where hacks like flip or \\x -> foo bar x 42 were happening. When designing a function signature what principles will help me to make the best use of currying? 回答1: For languages that support currying and partial-application easily, there is one compelling series of arguments, originally from Chris Okasaki: Put the data structure as the last argument Why? You can then compose