Atempt to implement in c++03 the Haskell function curring.