func perfectShuffle(_ arr: [T]) -> [T]? { guard arr.count & 1 == 0 else { return nil } let half = arr.count / 2 var res = [T]() for i in 0..