Get Updates By E-mail 

Article Written By:
Johann Dowa

Open Source iOS Library Providing And Extensive Functional Toolbelt For Data Structures

  •  
  •  
  •  
  •  
  •  

Previously I mentioned the Ruby inspired Objective-Sugar and the Underscore.js inspired Underscore.m.

Here’s an extensive functional toolbelt for objective-c for manipulating Foundation’s data structures from Underscore.m founder Robert Böhnke (Robb) called Asterism that takes a different approach from the previously mentioned libraries as it does not use a Ruby inspired syntax or categories.

As Robb stated in his e-mail:

It uses overloaded C-functions instead of categories (like BlocksKit and Objective-Sugar do). This allowed me to unify the interface for all kinds of different data-structures (NSArray, NSDictionary, NSSet, NSOrderedSet and occasionally even id< nsfastnumeration >)

Here’s an example from the readme showing the Asterism ASTEach command for iterating through an array:

ASTEach(@[ @"a", @"b", @"c" ], ^(NSString *letter) {
    NSLog(@"%@", letter);
});

ASTEach(@[ @"a", @"b", @"c" ], ^(NSString *letter, NSUInteger index) {
    NSLog(@"%u: %@", index, letter);
});

ASTEach(@{ @"foo": @"bar" }, ^(NSString *key, NSString *value) {
    NSLog(@"%@: %@", key, value);
});

You can find Asterism on the home page here.

A very nice library for working with data structures wihth a very clean syntax.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments