         print("\u{1B}7")
     }
     
-    func next() -> G.Element? {
+    public func next() -> G.Element? {
         let totalTime = CFAbsoluteTimeGetCurrent() - startTime
         
         var its = 0.0

    }
    
    func format(duration: NSTimeInterval) -> String {
        if let durationString = formatter.stringFromTimeInterval(duration) {
            return durationString
        }
        return ""
    }
}


struct Progress<G: SequenceType>: SequenceType {
    var generator: G
    
    init(_ generator: G) {
        self.generator = generator
    }
    
    func generate() -> ProgressGenerator<G.Generator> {
        let count = generator.underestimateCount()
        return ProgressGenerator(source: generator.generate(), count: count)
    }   

import Foundation

public final class ProgressGenerator<G: GeneratorType>: GeneratorType {
    var source: G
    var index = 0
    let startTime = CFAbsoluteTimeGetCurrent()
    let barLength = 30
    
    let count: Int
    init(source: G, count: Int) {
