This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
/** | |
Determine whether Optional collection is nil or an empty collection | |
:param: collection Optional collection | |
:returns: true if collection is nil or if it is an empty collection, false otherwise | |
*/ | |
public func isNilOrEmpty<C: CollectionType>(collection: C?) -> C? { | |
switch collection { |