 
 // Functional
 
-typealias Time = Dictionary<String, Int>
-typealias Positions = Dictionary<String, Array<Int>>
+typealias Time = [String : Int]
+typealias Positions = [String : [Int]]
 typealias State = (time: Time, positions: Positions)
 
-func moveCarsFunctional(positions: Array<Int>) -> Array<Int> {
+func moveCarsFunctional(positions: [Int]) -> [Int] {
     return positions.map { position in (randomPositiveNumberUpTo(10) > 3) ? position + 1 : position }
 }
 

}

func drawFunctional(state: State) -> () {
    let outputs: Array<String> = state.positions["positions"]!.map { position in outputCar(position) }
    
    print(join("\n", outputs))
}

    return Int(arc4random_uniform(UInt32(number)))
}

func randomElement(array: [String]) -> String {
    let randomIndex = randomPositiveNumberUpTo(array.count)
    return array[randomIndex]
}
