Generalized typeclass for queues and chans.