 
 import Foundation
 
-public struct OrderedDictionary<Key: Hashable, Value>: CollectionType, DictionaryLiteralConvertible, CustomStringConvertible, CustomDebugStringConvertible {
+public struct OrderedDictionary<Key: Hashable, Value>: CollectionType, DictionaryLiteralConvertible, CustomStringConvertible, CustomDebugStringConvertible, RangeReplaceableCollectionType {
     // MARK: - Associated Types
     public typealias Index = Int
     

        self.init()
        
        for element in elements {
            keys.append(element.0)
            _dictionary[element.0] = element.1
        }

    }
    
    /// Returns the Index for the given key, or nil if the key is not present in the dictionary.
    @warn_unused_result public func indexForKey(key: Key) -> Index? {
        return keys.indexOf(key)
    }
    
    /// If !self.isEmpty, return the first key-value pair in the sequence of elements, otherwise return nil.
    public mutating func popFirst() -> Element? {
        guard !self.isEmpty else { return nil }
        
        let key = keys.removeFirst()
