guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is ice-9/poe.scm broken?


From: Alan Grover
Subject: Is ice-9/poe.scm broken?
Date: Mon, 08 Aug 2005 11:52:10 -0400
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)

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
address@hidden
+1.734.476.0969

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]