标签:class blog code http com 2014
<pre name="code" class="html">“func hasAnyMatches(list: Int[], condition: Int -> Bool) -> Bool { for item in list { if condition(item) { return true } } return false } func lessThanTen(number: Int) -> Bool { return number < 10 } var numbers = [20, 19, 7, 12] hasAnyMatches(numbers, lessThanTen)” 摘录来自: Apple Inc. “The Swift Programming Language”。 iBooks. https://itunes.apple.com/cn/book/swift-programming-language/id881256329?mt=11
“func makeIncrementer() -> (Int -> Int) { func addOne(number: Int) -> Int { retur n 1 + number } return addOne } var increment = makeIncrementer() increment(7) ”摘录来自: Apple Inc. “The Swift Programming Language”。 iBooks. https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewBook?id=881256329
不支持:
a,b = (1,2)
swift 有些语法还是不支持。,布布扣,bubuko.com
标签:class blog code http com 2014
原文地址:http://blog.csdn.net/asmcos/article/details/28424437