14

Here’s an open source library that provides a number of functional programming helper methods in the style of Underscore and Lo-Dash for those working with the new Swift programming language called Dollar $wift from Ankur Patel.

Here are few examples of Dollar.$swift in action from the readme:

$.first([1, 2, 3, 4]) as Double == 1

$.compact([3, nil, 4, 5]) as NSObject[] == [3, 4, 5]

$.initial([3, 4, 5], numElements: 2) as Int[] == [3]

$.last([3, 4, 5]) as Int == 5

dollarswift.org – project homepage