Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //What is this gonna print?
- var numbers = [4, 7, 10, 99, 1, -3]
- numbers.sort {
- return $0 < $1
- }
- print(numbers)
- // Is following code possible in swift?
- func myMethod<T: Equatable>(_ x: T, _ y: T) -> Bool {
- return (x > y) ? true : false
- }
- myMethod("ray", "ray")
- myMethod(1, 1)
- //Is this true or false?
- .none == nil
- // What happen with
- print(1 == true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement