Subject: Re: [Re: First Occurrence of an Element] From: Gregg Reynolds <greyno@xxxxxxx> Date: Sun, 12 Apr 1998 21:44:08 -0400 |
Chuck Darney wrote: > >What I need to do is execute a function the first time a > SECTION element is encountered, but never again. "(element-number snl) Returns the number of elements before or equal to snl with the same gi as snl." >From section 10.2.4.2. If memory serves me I fiddled around with this function a few weeks ago, and if you call it with your SECTION elements as the snl, it should return 1 for the first occurence only. Is that what you're after? Related question for James (or anybody else who knows the source): does Jade memoize things like this? I'm still learning the finer points of the theory of side-effect free, functional programming; I gather the lack of side-effects makes caching of function-call results an important efficiency technique (unavailable to non-funtional compilers?). So here's a more general question: how useful is it in practice? Wouldn't extensive use of memoization strategies require some kind of run-time call pattern analyzer to decide which to memoize? (Sorry, I know it's not a DSSSL question.) -- DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [Re: First Occurrence of an Ele, Daniel Speck | Thread | FOT -> tex/html stylesheet, Daniel Wang |
RE: inline space, Yan Sorkin | Date | Bug in Norm's stylesheets 1.07 or i, Kendall G. Clark |
Month |