let str = "\(1)"
//=> "1"
let value = [1, 2, 3]
let str = "\(value)"
//=> "[1, 2, 3]"
let str = "\(value.count)"
//=> "3"
let str = "\(value.contains(2))"
//=> "true"
let str = "\(value.count)"
//=> "3"
let str = "\(value.map { $0 * 2 } .reduce (0, combine: +))"
//=> "12"
Last active
February 6, 2016 02:52
-
-
Save KentarouKanno/119178f22bf2b66a8603 to your computer and use it in GitHub Desktop.
StringInterpolationConvertible
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment