An attempt at emulating Python's slice notation in Swift