Implemented a deque in coffeescript