- iOS Programming Cookbook
- Hossam Ghareeb
- 81字
- 2021-07-09 18:29:37
How to do it...
- Go to Xcode and create a new playground file called Closures to test code about closures in it.
- To see closures in action, copy and paste this piece of code in the playground file (the output of each statement is printed on the right):
var names = ["David", "Jones", "Suzan", "Naomi", "Adam"] names.sort() // ["Adam", "David", "Jones", "Naomi", "Suzan"] names.sort{ (str1: String, str2: String) ->Bool in return str1 > str2 } // ["Suzan", "Naomi", "Jones", "David", "Adam"]
推薦閱讀
- 每天5分鐘玩轉Kubernetes
- Containerization with LXC
- Linux系統文件安全實戰全攻略
- FreeRTOS實時內核應用指南
- WindowsServer2012Hyper-V虛擬化部署與管理指南
- 精通Linux內核開發
- Windows Phone 7.5 Data Cookbook
- 高性能Linux服務器構建實戰:系統安全、故障排查、自動化運維與集群架構
- Kali Linux 2018:Windows Penetration Testing
- Kali Linux高級滲透測試
- Windows 7實戰從入門到精通(超值版)
- Advanced Infrastructure Penetration Testing
- Drupal 7 Cookbook
- VMware vSphere 5.1 Cookbook
- Linux系統安全:縱深防御、安全掃描與入侵檢測