 
 import Foundation
 
-/// Takes a decode closure and returns one that returns nil if the json object is `NSNull`
-
-
 extension Optional {
     
-    /// Create an array-decode-closure from an element decode closure
+    /// Creates an optional decoder from a decoder decoder of the Wrapped type
     ///
-    /// - returns: A closure that takes an `NSArray` and maps it using the element decode closure
+    /// This function is used by `=>` and `=>?` overloads when decoding `T?`
+    ///
+    /// - parameter decodeClosure: A decoder (decode closure) for the wrapped type
+    /// - returns: A closure takes an JSON object, checks it's `NSNull`, if so returns `nil`, otherwise calls the wrapped decode closure.
     static func decoder(_ decodeClosure: (AnyObject) throws -> Wrapped) -> (AnyObject) throws -> Wrapped? {
         return { json in
             if json is NSNull {

}

extension Dictionary {
    /// Create an dictionary-decode-closure from key- and value- decode closures
    ///
    /// - returns: A closure that takes a `NSDictionary` and "maps" it using key and value decode closures
    public static func decoder(key keyDecodeClosure: (AnyObject) throws -> Key, value elementDecodeClosure: (AnyObject) throws -> Value) -> (AnyObject) throws -> Dictionary {
        return { json in


extension Array {
    
    /// Creates an array decoder from an element decoder
    ///
    /// This function is used by `=>` and `=>?` overloads when decoding `[T]`
    ///
    /// - parameter decodeClosure: A decoder (decode closure) for the `Element` type
    /// - throws: if `NSArray.decode` throws or any element decode closure throws
    /// - returns: A closure that takes an `NSArray` and maps it using the element decode closure
    public static func decoder(_ elementDecodeClosure: (AnyObject) throws -> Element) -> (AnyObject) throws -> Array<Element> {
        return { json in
