     }
 
     private func sublayouts(_ keys: [LayoutKey]) -> [Layout] {
-        let layoutKeys = keys.map { $0.layoutKey }
-        return sublayouts.filter { layoutKeys.contains($0.key) } .map { $0.value }
+        return sublayouts.filter { keys.contains($0.key) } .map { $0.value }
     }
 }

import UIKit

public protocol LayoutKey {

    var layoutKey: String { get }
}

extension String: LayoutKey {

    public var layoutKey: String { return self }
}

public class Layout {


    }

    public subscript(key: LayoutKey) -> Layout {
        if let subLayout = sublayouts[key] {
            return subLayout
        } else {
            let sublayout = Layout()
            sublayouts[key] = sublayout
            return sublayout
        }
    }
