Skip to content

Commit

Permalink
[Swift 4] Update Select Minimum Maximum
Browse files Browse the repository at this point in the history
  • Loading branch information
remlostime committed Aug 27, 2017
1 parent 1eb05ba commit f03f5ec
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// last checked with Xcode 9.0b4
#if swift(>=4.0)
print("Hello, Swift 4!")
#endif

// Compare each item to find minimum
func minimum<T: Comparable>(_ array: [T]) -> T? {
guard var minimum = array.first else {
Expand Down

0 comments on commit f03f5ec

Please sign in to comment.