[Swift-user] array slicing?
Allan Espinosa
aespinosa at cs.uchicago.edu
Fri Mar 25 13:49:20 CDT 2011
Are there plans to incorporate this into the language?
I want to perform some aggregate operations in subelements of my array:
type file;
file somearray[] <array_mapper; file='one, two, three, ..., n'>;
file reduction1;
file reduction2;
file reduction3;
file commoninput <'somefile'>;
reduction1 = some_reduction(somearray[0:60], commoninput);
reduction2 = some_reduction(somearray[61:120], commoninput);
reduction3 = some_reduction(somearray[120:n], commoninput);
I am doing this so that I have more control over the number of times
commoninput is being staged to multiple resources.
-Allan
More information about the Swift-user
mailing list