a way to enqueue element: to add a new element to the queue let queue = Queue < String >() queue . For a better performance, we would need to implement our own index to move through elements, like a Circular Queue.