I’m not sure I follow. What do you mean by “function”? Do you mean starting from determining the function of moral behavior?
I’ve got my idea of function from the biological definition I got some time ago from Doug, meaning what it was selected for. The heart functions as a pump, for instance. I’m sure we can apply that to any behaviour. When we ask why we evolved to be altruistic, we are asking what is altruism’s function, I think.
Function is similar to purpose as in aim but not the same, as aim entails beings who are attempting to make the future some way by behaving some way.
Morals start off as purely functional, so altruism starts out as being selected because it’s beneficial to the group.
I think in order for there to be something that we ought to do, there needs to be an aim that we ought to have. So If I ought to fill a bucket of water (using a non moral example) then when I go to the tap I ought to take the bucket with me. If it has a hole in it I ought to repair the hole.
Can we establish some link between function and aim that can guide us perhaps? function is to do with survival whilst aim is to do with avoiding suffering/harm and gaining happiness.
I guess answering what is the function of suffereing and happiness would be a good start.