For example, a class has a method compute() (using Python syntax and dropping the self argument for clarity):
def compute(computation_fn):
return computation_fn(5)
Let's assume that computation_fn maps int to int. In a UML class diagram, should I write something like this?
+ compute(computation_fn: (num: int): int): int
If this has already been answered somewhere, just drop a link! I've been trying to look for an answer.