[Swift-devel] Swiftscript Iteration constructs, Clarification [GSoC 2011]

Yadu Nand yadudoc1729 at gmail.com
Tue Mar 22 15:27:53 CDT 2011


Hi,

This is regarding the idea on adding map, fold, scan to succeed the
current iterative programming constructs (foreach, iterate).

Currently foreach follows the following structure :

file source[ ];
file destination[ ];

foreach value, index in source {
    destination[index]  =  func( value );
}

map could do the same using the structure :
destination = map ( func,  source )

Is this what is required ?

Furthermore,
The swift userguide[1] mentions VDL.g and XDTM.xsd but those files
are either missing or have (more likely) been renamed.
Instead I have been looking at which I believe is the renamed version:
resources/swiftscript.g
resources/swiftscript.xsd

Any inputs are welcome and appreciated.

[1]   http://www.ci.uchicago.edu/swift/guides/userguide.pdf

-- 
Thanks and Regards,
Yadu Nand B



More information about the Swift-devel mailing list