Distributing intersection and union types with splits and duality (functional pearl)