Last active
March 9, 2016 07:51
-
-
Save axelarge/be0ef1eb8cf31026c47c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Gandrīz vienmēr | |
if ([self someThingOrOther]) { | |
return; | |
} | |
// Retos gadījumos (return, break, continue) | |
if ([self somethingOrOther]) return; | |
// Pretējā gadījumā vieglāk var notikt šis | |
if ([self somethingOrOther]) | |
return; | |
return; | |
// Vai šis | |
if ([self somethingOrOther]); | |
return; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Es pat negribētu iedomāties, kā ar alignošanu pēc koliem + "liec visu savā rindā" stilu izskatītos, piemēram, šāds koda gabals | |
NSArray<CBTag *> *tagsToExport = [[[[[self.model | |
updatedTagIdsAfterUpdateId:lastUpdateId] | |
objectEnumerator] | |
map:^(NSString *tagId) { | |
return [self.tags tagWithId:tagId]; | |
}] | |
filter:^(CBTag *tag) { | |
return [self shouldExportTag:tag]; | |
}] | |
toArray]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment