[Swift-devel] file declaration inside foreach

Mihael Hategan hategan at mcs.anl.gov
Tue Apr 24 16:33:30 CDT 2007


Why if we can actually express the problem?

On Tue, 2007-04-24 at 16:30 -0500, Yong Zhao wrote:
> There was a sequential option for 'foreach', and maybe we can translate
> that into a sequential for in karajan.
> 
> Yong.
> 
> On Tue, 24 Apr 2007, Ben Clifford wrote:
> 
> >
> >
> > On Tue, 24 Apr 2007, Veronika  V. Nefedova wrote:
> >
> > > The main problem: it submitted 2 jobs at once (foreach loop is for i=1,2). And
> > > since the jobs were supposed to run one after another - they all failed
> > > (application failure)
> >
> > ok. That's expected, or at least, I expect it.
> >
> > foreach is a parallel map-like operation for running some action on each
> > element in an array independent of the other elements.
> >
> > I think you probably can't express that kind of iteration in SwiftScript
> > at the moment (unless 'while' happens to work for you) though I'm poking
> > round with ways to express that. (in functional programming terms, you're
> > trying to do a fold rather than a map, I think).
> >
> > --
> > _______________________________________________
> > Swift-devel mailing list
> > Swift-devel at ci.uchicago.edu
> > http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
> >
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
> 




More information about the Swift-devel mailing list