Hello.
The prototype of the function is:
def emit(e : Event, scope : (Address)=>boolean)
The first parameter is the event to be emitted. The second parameter is named the "scope". It is a lambda expression that evaluates if an agent should receive the event.
For example:
emit(new MyEvent) [ it.UUID == myAgentID]
This line emits an occurrence of MyEvent. The code between the brackets is the
lambda expression (written as its externalized form) that is evaluated for each agent. The parameter of this lambda (named "it") is the address of the agent to test. "myAgentID" is a local variable that contains the UUID of the agent that is supposed to receive the event. Then the lambda expression tests if the UUID of the potential receiving agent ("it.UUID") is equal to the expected UUID of the receiving agent (myAgentID).
Since the scope is written as a lambda expression, you could write a more complex expression, based on boolean operators for example.
All the best.