unionWith package:threepenny-gui

Merge two event streams of the same type. In case of simultaneous occurrences, the event values are combined with the binary function. Think of it as
unionWith f ((timex,x):xs) ((timey,y):ys)
| timex == timey = (timex,f x y) : unionWith f xs ys
| timex <  timey = (timex,x)     : unionWith f xs ((timey,y):ys)
| timex >  timey = (timey,y)     : unionWith f ((timex,x):xs) ys