On Tue, 2005-05-17 at 21:07 -0500, Mario Storti wrote:

   > Is there an easy way to get the rest arguments _without_
   > the keyword arguments?

i use `remove-keys', appended.  munge to taste.

thi

______________________________________________________________________
;;; ttn/optargs-kw-utils.scm --- make using (ice-9 optargs-kw) easier

;; Rel:v-0-41-pianto-due-ore
;;
;; Copyright (C) 2003-2005 Thien-Thi Nguyen
;; This file is part of ttn's personal scheme library, released under GNU
;; GPL with ABSOLUTELY NO WARRANTY.  See the file COPYING for details.

;;; Commentary:

;; This module exports:
;;  (remove-keys ls)

;;; Code:

(define-module (ttn optargs-kw-utils)
  #:export (remove-keys))

(define (remove-keys ls)
  (let loop ((ls ls) (acc '()))
    (if (null? ls)
        (reverse! acc)
        (let ((kw? (keyword? (car ls))))
          (loop ((if kw? cddr cdr) ls)
                (if kw? acc (cons (car ls) acc)))))))

;;; ttn/optargs-kw-utils.scm ends here


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user

Reply via email to