モナドってこういうもの?

int x;
int getter(){return x;}
void setter(int a){x = a;}
void f(int* g(), void* s(int))
{
s(g() + 1);
}

f(getter, setter);