Re: [Re: First Occurrence of an Element]

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
  • Re: [Re: First Occurrence of an Element]
    • Chuck Darney - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id KAA16349Wed, 15 Apr 1998 10:36:48 -0400 (EDT)
      • Chris Maden - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id KAA16720Wed, 15 Apr 1998 10:51:00 -0400 (EDT)
      • Daniel Speck - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id KAA16856Wed, 15 Apr 1998 10:54:21 -0400 (EDT)
      • Gregg Reynolds - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id WAA24382Wed, 15 Apr 1998 22:47:00 -0400 (EDT) <=