 }
 
 public func < (lhs: SemanticVersion, rhs: SemanticVersion) -> Bool {
-    if lhs.major < rhs.major || lhs.minor < rhs.minor || lhs.patch < rhs.patch {
-        return true
-    }
-
-    if lhs.prereleaseBase < rhs.prereleaseBase || lhs.prereleaseNumber < rhs.prereleaseNumber {
-        return true
-    }
-    return false
+    return !(lhs >= rhs)
 }
 
 public func <= (lhs: SemanticVersion, rhs: SemanticVersion) -> Bool {
-    if lhs < rhs || lhs == rhs {
-        return true
-    }
-    return false
+    return !(lhs > rhs)
 }

    }
}

extension SemanticVersion: Equatable { }

public func == (lhs: SemanticVersion, rhs: SemanticVersion) -> Bool {
    return lhs.major == rhs.major

}

public func != (lhs: SemanticVersion, rhs: SemanticVersion) -> Bool {
    return !(lhs == rhs)
}

public func > (lhs: SemanticVersion, rhs: SemanticVersion) -> Bool {
    if lhs.major > rhs.major || lhs.minor > rhs.minor || lhs.patch > rhs.patch {
