Fix in=terator in deque, scala ex1 and ex2 are done