unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* poe.scm perfect-funcq bit rot
@ 2003-09-20 23:22 Kevin Ryde
  2003-10-07 15:53 ` Marius Vollmer
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Ryde @ 2003-09-20 23:22 UTC (permalink / raw)


I was silly enough to try poe.scm,

	(use-modules (ice-9 poe))
	(define p (perfect-funcq 123 noop))
	(p 'x)

and got

	In procedure caar in expression (caar alist):
	Wrong type argument in position 1: ()
	ABORT: (wrong-type-arg)

This is in funcq-assoc, and I think that function looks fairly
doubtful as it stands.

It seems to be assuming '() is false, which might be some bit-rot, and
I also can't see how it works its way down the given alist, it looks
like the and-map loop will only examine the first entry.

Perhaps (below),

        * poe.scm (funcq-assoc): Rewrite, don't assume '() is false, actually
        traverse the given alist.

This quietly drops the "let ((it ..." business, which I assume serves
no purpose.

This would probably be for 1.6 too, though it's all undocumented so
doesn't really rate.


;; return true if lists X and Y are the same length and each element is `eq?'
(define (eq?-list x y)
  (if (null? x)
      (null? y)
      (and (not (null? y))
           (eq? (car x) (car y))
           (eq?-list (cdr x) (cdr y)))))

(define (funcq-assoc arg-list alist)
  (if (null? alist)
      #f
      (if (eq?-list arg-list (caar alist))
          (car alist)
          (funcq-assoc arg-list (cdr alist)))))


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: poe.scm perfect-funcq bit rot
  2003-09-20 23:22 poe.scm perfect-funcq bit rot Kevin Ryde
@ 2003-10-07 15:53 ` Marius Vollmer
  2003-10-08 23:03   ` Kevin Ryde
  0 siblings, 1 reply; 3+ messages in thread
From: Marius Vollmer @ 2003-10-07 15:53 UTC (permalink / raw)


Kevin Ryde <user42@zip.com.au> writes:

> This would probably be for 1.6 too, though it's all undocumented so
> doesn't really rate.

Yep.  Please fix it in HEAD only.  Maybe we should remove poe.scm and
hcons.scm?

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: poe.scm perfect-funcq bit rot
  2003-10-07 15:53 ` Marius Vollmer
@ 2003-10-08 23:03   ` Kevin Ryde
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Ryde @ 2003-10-08 23:03 UTC (permalink / raw)


Marius Vollmer <mvo@zagadka.de> writes:
>
> Yep.  Please fix it in HEAD only.

Done.


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-10-08 23:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-20 23:22 poe.scm perfect-funcq bit rot Kevin Ryde
2003-10-07 15:53 ` Marius Vollmer
2003-10-08 23:03   ` Kevin Ryde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).