When I tried to use poe to cache some functions, I got a run-time error.
When I examined poe.scm to understand what I did wrong, I found code
that doesn't make sense under guile. Can anyone confirm that poe is
outdated, or I have a completely wrong idea of how to use it?

guile: 1.6.4

Here's how I tried to use it:

        (use-modules (ice-9 poe))
        (define (some-fn a) (list 'did-something a)) ; trivial function
        (define cached-fn (pure-funcq some-fn))

        (some-fn 'an-arg)
        (cached-fn 'an-arg) ; first time through (dies in here)
        (cached-fn 'an-arg) ; second time through

In poe.scm, it seems to be using the old idiom of '() being treated as
false:

        (or (and (and (not key) (not entry))
        ... (eq? (car key) (car entry))

Which I think is supposed to be
        (or (and (and (not (pair? key)) (not (pair? entry)))
        ... (eq? (car key) (car entry))

I re-wrote enough of poe.scm to get some things working.

-- 
Alan Grover
[EMAIL PROTECTED]
+1.734.476.0969

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Guile-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/guile-user

Reply via email to