enum DoorState: String {
    case Opened = "Opened"
    case Closed = "Closed"
}


var doorsStateList = [DoorState](count: 100, repeatedValue: DoorState.Closed)


for i in 1...100 {
    
    map(stride(from: i - 1, to: 100, by: i)) {
        doorsStateList[$0] = doorsStateList[$0] == .Opened? .Closed: .Opened
    }
}


for (index, item) in enumerate(doorsStateList) {
    println("Door \(index+1) is \(item.rawValue)")
}