I was wondering what is the best way to represent a function that is passed as a parameter in UML. Because I want to create a sequence diagram of my current networking code in my Swift project and some functions pass a function as parameter to other functions. So I was wondering is their a standard way to describe it in UML, or can I use swift syntax in my UML.
UML – Representing a Function as a Parameter in UML
networkingrestsequence-diagramswift-languageuml
Best Answer
If a caller passes a function pointer to a callee, it is essentially defining a callback. You may need to represent it as all of the following:
See also this post.