PipesNotTears是Swift的数组扩展包。
[4,2,3,3,3,3,1] | sorted | unique | reverse | chunk(2) //=> [[4,3], [2,1]][1,5,2,4,3] | sorted | suffix(2) //=> [4,5]if any([1,2,3] | shuffle | prefix(2), { $0 > 2 }) { println(":)")}["key1": 1] + ["key2": 2] //=> ["key1": 1, "key2": 2]点击空白处退出提示
评论