I have the following class:
class ReportView: NSView { var categoriesPerPage = [[Int]]() var numPages: Int = { return categoriesPerPage.count } } <
Just in case someone really needs a closure like that, it can be done in the following way:
var categoriesPerPage = [[Int]]() var numPagesClosure: ()->Int { return { return self.categoriesPerPage.count } }