Swift Segment-tree Resources