Skip to content

Instantly share code, notes, and snippets.

@stevencurtis
Created December 26, 2020 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevencurtis/32283ee40714c777607aadaee1f13527 to your computer and use it in GitHub Desktop.
Save stevencurtis/32283ee40714c777607aadaee1f13527 to your computer and use it in GitHub Desktop.
this is my gist
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let foo: NSArray = NSArray(array: [5, 6, 7])
let bar = foo as? [Int]
print(bar?.reduce(0, +))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment