Data update
This commit is contained in:
parent
5af6d93694
commit
796d366b97
455 changed files with 7413 additions and 1900 deletions
11
Task/Filter/FutureBasic/filter-1.basic
Normal file
11
Task/Filter/FutureBasic/filter-1.basic
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
include "NSLog.incl"
|
||||
|
||||
local fn EvenNumbersFromArrayToNewArray
|
||||
CFArrayRef numbersArray = @[@1,@2,@3,@4,@5,@6,@7,@8,@9,@10,@11,@12]
|
||||
PredicateRef isEvenPred = fn PredicateWithFormat( @"modulus:by:(SELF, 2) == 0" )
|
||||
CFArrayRef evensArray = fn ArrayFilteredArrayUsingPredicate( numbersArray, isEvenPred )
|
||||
NSLog( @"Array of odd and even numbers before sort:\n\t%@\n", numbersArray )
|
||||
NSLog( @"New array of even numbers after sort:\n\t%@\n", evensArray )
|
||||
end fn
|
||||
fn EvenNumbersFromArrayToNewArray
|
||||
NSLogScrollToTop
|
||||
12
Task/Filter/FutureBasic/filter-2.basic
Normal file
12
Task/Filter/FutureBasic/filter-2.basic
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
local fn OddNumbersRemovedFromArray
|
||||
CFMutablearrayRef mutableNumbersArray = fn MutableArrayWithArray( @[@1,@2,@3,@4,@5,@6,@7,@8,@9,@10,@11,@12] )
|
||||
NSLog( @"Mutable array of odd and even numbers before sort:\n\t%@\n", mutableNumbersArray )
|
||||
PredicateRef isEvenPred = fn PredicateWithFormat( @"modulus:by:(SELF, 2) == 0" )
|
||||
MutableArrayFilterUsingPredicate( mutableNumbersArray, isEvenPred )
|
||||
NSLog( @"Mutable array with odd numbers removed:\n\t%@\n", mutableNumbersArray )
|
||||
end fn
|
||||
|
||||
fn OddNumbersRemovedFromArray
|
||||
NSLogScrollToTop
|
||||
|
||||
HandleEvents
|
||||
Loading…
Add table
Add a link
Reference in a new issue