Stronger typing to distinguish stack and queue.