#include <iostream>
#include <functional>

using namespace std;

double do_sub(double a, double b) {
  return a - b;
}

int main() {
  using namespace placeholders;
  function<double(double, double)>
    rev_sub = bind(do_sub, _2, _1);
  cout << rev_sub(3, 1) << endl;
}
