 #elseif os(OSX)
     import AppKit
 #endif
+import CoreGraphics
 
 public extension NSLayoutConstraint {
 #if os(iOS)

}

public extension SequenceType where Generator.Element == String {
    public func constraintsWithViews(views: [String: NSLayoutConstraint.View], metrics: [String: Double]? = nil) -> [NSLayoutConstraint] {
        return NSLayoutConstraint.constraintsWithVisualFormats(Array(self), metrics: metrics, views: views)
    }
}

#elseif os(OSX)
    typealias View = NSView
#endif
    typealias MetricValueType = CGFloat
    
    public static func constraintsWithVisualFormats(formats: [String], options: NSLayoutFormatOptions = [], metrics: [String: MetricValueType]? = nil, views: [String: View]) -> [NSLayoutConstraint] {
        return formats.reduce([NSLayoutConstraint]()) {
            $0 + constraintsWithVisualFormat($1, options: options, metrics: metrics, views: views)
        }
    }
}
