dequeswift4.2xcode11.4

Problems Enumerated Deque<Double>()


I use "attaswift/Deque" library. I have a double Deque;

var pointsZ =  Deque<Double>()

I want to use;

for (index,value) in pointsZ.enumerated(){
...
}

I got error "For-in loop requires EnumeratedSequence<Deque<Double>> to conform to Sequence" in Xcode 11.4.1. How can solve this problem?


Solution

  • I change my for loop like;

    for i in 0..<pointsZ.count {
                   print(pointsZ[i])
     }
    

    It solve my problem.