Giter VIP home page Giter VIP logo

asterism's People

Contributors

grgcombs avatar monkeydom avatar ole avatar robb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

asterism's Issues

Add support for NSCountedSet

This one is a little more tricky since NSCountedSet inherits from NSMutableSet.

Since we would want ASTMap(countedSet, block); to be equivalent to ASTMap((NSSet *)countedSet, block);, "unrolling" versions of map et. al. would need an extra parameter.

E.g.:

// if unroll is YES, calls the block multiple times per element.
NSCountedSet *ASTMap(NSCountedSet *set, BOOL unroll, id(^block)(id obj));

Should we use appledoc instead?

That may allow better integration with cocoadocs and Dash. Even though I personally prefer reading TomDoc in the headers, this may be the right thing to do for the community at large.

Fix import of ASTAny

Tests probably shouldn't import the commands directly, to make sure this is caught in the future.

Asterism should handle `nil` input values

I'm having second thoughts about asserting against nil all over the place, I think it's best and more in the spirit of the surrounding Cocoa framework if stuff like

ASTMap(nil, ^(id obj, NSUInteger index) {
     return [obj foo];
});

simply returned nil.

Add support for NSDictionary to NSFastEnumeration-only methods

Consider methods that operate only on id<NSFastEnumeration> such as ASTAll

ASTAll(@{ @"key": @"value" }, someTest);

This will actually evaluate @"key" rather than @"value", which is probably more desired.
However, if we add

BOOL ASTAll(NSDictionary *dict, BOOL(^block)(id value));

later, this may lead to some nasty surprises. Better to pre-empt that now and add dictionary versions that call the existing ones with allValues.

Affects

  • ASTAll
  • ASTAny
  • ASTGroupBy
  • ASTIndexBy
  • ASTMin
  • ASTMax
  • ASTPluck
  • ASTReduce

Add support for NSIndexSet

yay or nay?

Those methods would make sense for NSIndexSet:

  • ASTAll
  • ASTAny
  • ASTDifference
  • ASTEach
  • ASTEmpty
  • ASTFilter
  • ASTFind
  • ASTHead
  • ASTIntersection
  • ASTMap
  • ASTMin
  • ASTMax
  • ASTReduce
  • ASTReject
  • ASTSize
  • ASTTail
  • ASTUnion
  • ASTWithout

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.