Start ArticleArray.swift.

This commit is contained in:
Brent Simmons 2017-11-01 20:45:38 -07:00
parent 129f7a5da9
commit af3f41fbda
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
//
// ArticleArray.swift
// Evergreen
//
// Created by Brent Simmons on 11/1/17.
// Copyright © 2017 Ranchero Software. All rights reserved.
//
import Foundation
import Data
extension Array where Element == Article {
func articleAtRow(_ row: Int) -> Article? {
if row < 0 || row == NSNotFound || row > count - 1 {
return nil
}
return self[row]
}
}