2 ms·
Sort of: the version I gave flips the first two parameters of a function, leaving the rest untouched. The C++ std::flip from the article, however, reverses the
by hackyhacky 1y ago
Sort of: the version I gave flips the first two parameters of a function, leaving the rest untouched.
The C++ std::flip from the article, however, reverses the order of all parameters. Reproducing that in Haskell would require fancy type-level programming or compile-time metaprogramming, both of which would defeat the simplicity of my initial version.