Skip to content

Instantly share code, notes, and snippets.

@MrMage
Last active April 12, 2016 15:12
Show Gist options
  • Save MrMage/583c3b66427ea31d7c362227dbbea20f to your computer and use it in GitHub Desktop.
Save MrMage/583c3b66427ea31d7c362227dbbea20f to your computer and use it in GitHub Desktop.
import Cocoa
struct TaskTitleArray: Equatable {
let title: String
let children: [TaskTitleArray]
init(title: String, children: [TaskTitleArray]) {
self.title = title
self.children = children
}
init(title: String, children: [(String, Any?)]) {
self.title = title
self.children = []
}
}
let lhs: TaskTitleArray = TaskTitleArray(title: "root", children: [
("child0", nil),
("child1", [
("child10", [
("child100", nil)])]),
("child2", nil)] as [(String, Any?)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment