     return false
 }
 
-public func all<T>(_ elements: [T?], test: ((AnyObject?) -> Bool)? = nil) -> Bool {
+public func all<T>(_ elements: [T?], test: ((Any?) -> Bool)? = nil) -> Bool {
     for element in elements {
         if !truthy(element) {
             return false

    return true
}

public func any<T>(_ elements: [T?], test: ((AnyObject?) -> Bool) = truthy) -> Bool {
    for element in elements {
        if let element = element {
            if test(element as AnyObject?) {

    return true
}

public func any(_ elements: [Any?], test: ((Any?) -> Bool) = truthy) -> Bool {
    for element in elements {
        if test(element) {
            return true
