     public static let deferredToDate: ObjectEncoder.DateEncodingStrategy? = nil
 
     /// Encode the `Date` as a UNIX timestamp (as a `Double`).
-    public static let secondsSince1970 = ObjectEncoder.DateEncodingStrategy.custom {
-        var container = $1.singleValueContainer()
-        try container.encode($0.timeIntervalSince1970)
+    public static let secondsSince1970 = ObjectEncoder.DateEncodingStrategy.custom { date, encoder in
+        var container = encoder.singleValueContainer()
+        try container.encode(date.timeIntervalSince1970)
     }
 
     /// Encode the `Date` as UNIX millisecond timestamp (as a `Double`).
-    public static let millisecondsSince1970 = ObjectEncoder.DateEncodingStrategy.custom {
-        var container = $1.singleValueContainer()
-        try container.encode(1000.0 * $0.timeIntervalSince1970)
+    public static let millisecondsSince1970 = ObjectEncoder.DateEncodingStrategy.custom { date, encoder in
+        var container = encoder.singleValueContainer()
+        try container.encode(1000.0 * date.timeIntervalSince1970)
     }
 
     /// Encode the `Date` as an ISO-8601-formatted string (in RFC 3339 format).
     @available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
-    public static let iso8601 = ObjectEncoder.DateEncodingStrategy.custom {
-        var container = $1.singleValueContainer()
-        try container.encode(iso8601Formatter.string(from: $0))
+    public static let iso8601 = ObjectEncoder.DateEncodingStrategy.custom { date, encoder in
+        var container = encoder.singleValueContainer()
+        try container.encode(iso8601Formatter.string(from: date))
     }
 
     /// Encode the `Date` as a string formatted by the given formatter.
     public static func formatted(_ formatter: DateFormatter) -> ObjectEncoder.DateEncodingStrategy {
-        return .custom {
-            var container = $1.singleValueContainer()
-            try container.encode(formatter.string(from: $0))
+        return .custom { date, encoder in
+            var container = encoder.singleValueContainer()
+            try container.encode(formatter.string(from: date))
         }
     }
 

}

extension ObjectEncoder.EncodingStrategy where T == Double {
    public static let throwOnNonConformingFloat = ObjectEncoder.DoubleEncodingStrategy.custom {
        guard let encoder = $1 as? ObjectEncoder.Encoder else {
            fatalError("unreachable")
        }
        guard !$0.isInfinite && !$0.isNaN else {
            throw _invalidFloatingPointValue($0, at: encoder.codingPath)
        }
        encoder.object = NSNumber(value: $0)
    }

    public static func convertNonConformingFloatToString(_ positiveInfinity: String,
                                                         _ negativeInfinity: String,
                                                         _ nan: String) -> ObjectEncoder.DoubleEncodingStrategy {
        return .custom {
            guard let encoder = $1 as? ObjectEncoder.Encoder else {
                fatalError("unreachable")
            }
            if $0 == .infinity {
                encoder.object = positiveInfinity
            } else if $0 == -.infinity {
                encoder.object = negativeInfinity
            } else if $0.isNaN {
                encoder.object = nan
            } else {
                encoder.object = NSNumber(value: $0)
            }
        }
    }

}

extension ObjectEncoder.EncodingStrategy where T == URL {
    public static let compatibleWithJSONEncoder = ObjectEncoder.EncodingStrategy<URL>.custom { url, encoder in
        var container = encoder.singleValueContainer()
        try container.encode(url.absoluteString)
    }

    public static func custom(_ closure: @escaping Closure) -> ObjectEncoder.EncodingStrategy<URL> {
