Categories
iOS Development Libraries Objective-C Open Source iOS Libraries And Tools Swift

Open Source Functional Programming Toolbelt For Swift Inspired By The Underscore.js Library

I’ve mentioned a few utility objective-c utility libraries inspired by Underscore.js most recently the Aterism library.

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

You can find Dollar.$wift on the home page here.

A nice library for anyone working with Swift.