guile-devel
[Top][All Lists]
Advanced

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

Re: Appending Queues


From: Ian Price
Subject: Re: Appending Queues
Date: Fri, 02 Nov 2012 17:20:35 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Noah Lavine <address@hidden> writes:

> The only change I was considering is allowing an arbitrary number of
> arguments, but that's something I can implement if people agree that
> we want the functions in (ice-9 q).

I'm loath to add anything to (ice-9 q) since I find the names, and
the lack of a distinct type, less than satisfactory.

However, if you are going to add them, I'd recommend sticking with the
q- prefix. So, q-append and q-append!. Keeping the naming consistent
means one less exception to remember.

Also, I think it might be wise to add a list->q and q->list, with the
obvious simple implementations

(define (q->list q)
  (car q))

(define (list->q l)
  (if (null? l)
      (make-q)
      (cons l (last-pair l))))

-- 
Ian Price -- shift-reset.com

"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"



reply via email to

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