[Swift-devel] Re: fixed_array_mapper versus array_mapper on output
    Allan Espinosa 
    aespinosa at cs.uchicago.edu
       
    Sat Feb 12 15:59:11 CST 2011
    
    
  
Moving thread to devel for brainstorming possible solutions:
1.  implement a join() function: @join(array, ", ");
2.  fix array_mapper
2011/2/12 Allan Espinosa <aespinosa at cs.uchicago.edu>:
> For an array output data structure, the two mappers behave differently
>
> type file;
>
> app(file o[])
>    split(file i){
>  split "-l" 1 @filename(i) "seqout.";
> }
>
> /*file out[] <array_mapper; files=["seqout.aa", "seqout.ab",
> "seqout.ac",  // Does not work
>                                 "seqout.ad"]>;*/
> file out[] <fixed_array_mapper; files="seqout.aa, seqout.ab,
> seqout.ac, seqout.ad">; // Works
>
> file input <"seq.in">;
> out = split(input);
>
>
-- 
Allan M. Espinosa <http://amespinosa.wordpress.com>
PhD student, Computer Science
University of Chicago <http://people.cs.uchicago.edu/~aespinosa>
    
    
More information about the Swift-devel
mailing list