26 lines
604 B
Plaintext
26 lines
604 B
Plaintext
void local fn DoIt
|
|
CFArrayRef nums = @[@1, @2, @3, @4, @5, @6, @7, @8, @9, @10]
|
|
print @"nums:",,concat @", ",(nums)
|
|
print
|
|
|
|
print @"sum: ",,intval(fn ObjectValueForKeyPath( nums, @"@sum.self" ))
|
|
|
|
long product = 1
|
|
for CFNumberRef num in nums
|
|
product *= intval(num)
|
|
next
|
|
print @"product:",product
|
|
|
|
print @"concat:",,concat(@"",nums)
|
|
|
|
print @"min: ",,intval(fn ObjectValueForKeyPath( nums, @"@min.self" ))
|
|
|
|
print @"max: ",,intval(fn ObjectValueForKeyPath( nums, @"@max.self" ))
|
|
|
|
print @"avg: ",,intval(fn ObjectValueForKeyPath( nums, @"@avg.self" ))
|
|
end fn
|
|
|
|
fn DoIt
|
|
|
|
HandleEvents
|