 }
 
 /**
-This function is documented with the FilterFunction type.
-
-:see: FilterFunction
+Builds a filter that takes a single `Double?` argument.
+
+For example:
+
+    let square = Filter { (x: Double?, _) in
+        if let x = x {
+            return Box(x * x)
+        } else {
+            return Box()
+        }
+    }
+
+    let template = Template(string: "{{square(x)}}")!
+    template.registerInBaseContext("square", Box(square))
+
+    // "100"
+    template.render(Box(["x": 10.0]))!
+
+If the template argument evaluates to a missing value, or a value which is not
+convertible to Double, the filter is given nil.
+
+    // Both render the empty string
+    template.render(Box())!
+    template.render(Box(["x": "foo"]))!
+
+Values which are convertible to Double are:
+    
+    // "100"
+    template.render(Box(["x": 10]))!                    // Int
+    template.render(Box(["x": 10 as UInt]))!            // UInt
+    template.render(Box(["x": 10.0]))!                  // Double
+    template.render(Box(["x": NSNumber(integer: 10)]))! // NSNumber
+    // "1"
+    template.render(Box(["x": NSNumber(bool: true)]))!  // NSNumber (continued)
+    template.render(Box(["x": true]))!                  // Bool
+
+If the filter is given several arguments, an error of domain
+`GRMustacheErrorDomain` and code `GRMustacheErrorCodeRenderingError` is returned
+when the template is rendered.
+
+:param: a function that turns an integer into a MustacheBox
+:returns: a FilterFunction
 */
 public func Filter(filter: (Double?, NSErrorPointer) -> MustacheBox?) -> FilterFunction {
     return { (box: MustacheBox, partialApplication: Bool, error: NSErrorPointer) in

}

/**
This function is documented with the FilterFunction type.

:see: FilterFunction
*/
public func Filter(filter: (Int, NSErrorPointer) -> MustacheBox?) -> FilterFunction {
    return { (box: MustacheBox, partialApplication: Bool, error: NSErrorPointer) in

}

/**
Builds a filter that takes a single argument of type `T?`.

For example:

    let uppercase = Filter { (string: String?, _) in
        if let string = string {
            return Box(string.uppercaseString)
        } else {
            return Box()
        }
    }

    let template = Template(string: "{{uppercase(string)}}")!
    template.registerInBaseContext("uppercase", Box(uppercase))

    // "HELLO"
    template.render(Box(["string": "Hello"]))!

If the template argument evaluates to a missing value, or a value which is not
of type T, the filter is given nil.

    // Both render the empty string
    template.render(Box())!
    template.render(Box(["string": 1]))!

If the filter is given several arguments, an error of domain
`GRMustacheErrorDomain` and code `GRMustacheErrorCodeRenderingError` is returned
when the template is rendered.

:param: a function that turns a value of type `T?` into a MustacheBox
:returns: a FilterFunction
*/
public func Filter<T>(filter: (T?, NSErrorPointer) -> MustacheBox?) -> FilterFunction {
    return { (box: MustacheBox, partialApplication: Bool, error: NSErrorPointer) in
