[Swift-devel] Problem with iterate

Ben Clifford benc at hawaga.org.uk
Sat Feb 20 14:10:26 CST 2010


> That would probably be better for most cases. Though I'm not sure how
> exactly this would be expressed.

If you're trying to keep syntax that looks vaguely like foreach and 
iterate now, I'm not sure what either would look like...

When I implemented iterate I toyed with the idea of having magic variables 
called old and new that you could access, like this:

iterate {
  new = f(old)
} until(checkwonderful(new))

-- 




More information about the Swift-devel mailing list