Ruby-like collection extensions in Swift