摘要: 函数 func x(a:Int, b:Int) {} func x(a:Int, b:Int) -> Void {} func x(a:Int, b:Int) ->(Int,Int) {} 外部参数名 func x(width a:Int,height b:Int) -> Int {} func x 阅读全文
posted @ 2015-01-10 23:04 随心~ 阅读(737) 评论(0) 推荐(0) 编辑
摘要: map、flatMap、filter和reduce,几乎实现lambda表达式的语言里都会在集合里增加这些方法, 见swift 学习(一)基础知识 (基本数据类型,操作符,流控制,集合)中的集合 http://objccn.io/ https://www.objc.io/ map 通过map实现元素 阅读全文
posted @ 2015-01-10 22:23 随心~ 阅读(3225) 评论(0) 推荐(0) 编辑