Analytics event dispatch
This is a take-home assignment. Design a layer in plain Swift that sends analytics events to several services (Google Analytics, Snowplow, and so on). Requirements: one line at the call site, events are modular and easy to add or remove, event names and parameters can differ per service, a service can opt in to specific events, and adding a service touches no existing code. How do you design the types?