Skip to content

Commit

Permalink
Thoroughly document all methods in YOLO.h
Browse files Browse the repository at this point in the history
Tag 10
  • Loading branch information
mxcl committed Jun 2, 2014
1 parent a0883da commit f160b32
Show file tree
Hide file tree
Showing 5 changed files with 641 additions and 22 deletions.
6 changes: 6 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
I, Max Howell the copyright holder of this work, hereby release it into
the public domain. This applies worldwide.

In case this is not legally possible, I grant any entity the right to
use this work for any purpose, without any conditions, unless such
conditions are required by law.
13 changes: 3 additions & 10 deletions NSDictionary+extend.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,12 @@

@implementation NSDictionary (YOLO)

- (NSDictionary *(^)(id, ...))extend {
return ^NSDictionary *(NSDictionary *key, ...) {
- (NSDictionary *(^)(NSDictionary *))extend {
return ^NSDictionary *(NSDictionary *key) {
if (!key)
return self;
NSMutableDictionary *cp = self.mutableCopy;
if ([key isKindOfClass:[NSDictionary class]]) {
[cp addEntriesFromDictionary:key];
} else {
va_list args;
va_start(args, key);
cp[key] = va_arg(args, id);
va_end(args);
}
[cp addEntriesFromDictionary:key];
return cp.copy;
};
}
Expand Down
Loading

0 comments on commit f160b32

Please sign in to comment.