[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: Re: A question about the expressive power and
> A general statement about what "for" cannot do: Any problem of sequence processing, > which requires that the result of processing an item be used as input for processing > the next item(s). > > Is this true? yes I think so (ie you can't implement fold given map, more or less:-) Of course you can generate a sequence of running totals using something like for $i in 1 to count($x) return sum($x[position() <= $i]) but that's not really a "running total" as the first bits are repeatedly re-avaluated, whereas what you'd like to do is pass a two argument function over the list where at each stage the first argumant is the previous result and teh second argument is the new item. David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|