 extension Double : NumericType {
     static var max : Double { return DBL_MAX }
     static var min : Double { return DBL_MIN }
+    public func successor() -> Double {
+        return nextafter(self, self + 1)
+    }
 }
 
 extension Float  : NumericType {
     static var max : Float { return FLT_MAX }
     static var min : Float { return FLT_MIN }
+    public func successor() -> Float {
+        return nextafterf(self, self + 1)
+    }
 }
 
 func &+(lhs: Double, rhs: Double) -> Double { return lhs + rhs }


// partially from source: http://natecook.com/blog/2014/08/generic-functions-for-incompatible-types/

protocol NumericType {
    
    func &+(lhs: Self, rhs: Self) -> Self
    func &-(lhs: Self, rhs: Self) -> Self
