unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* rest arguments in let-keywords
@ 2005-05-18  2:07 Mario Storti
  2005-05-18 23:35 ` Clinton Ebadi
  0 siblings, 1 reply; 4+ messages in thread
From: Mario Storti @ 2005-05-18  2:07 UTC (permalink / raw)


I want to use let-keywords, however it bothers to me the fact that the
rest arguments keeps the keyword arguments, so that I have to write
code to eliminate them. I read that this is for comptability with
Common Lisp. Is there an easy way to get the rest arguments _without_
the keyword arguments?

TIA, Mario

-------------------------
Mario Alberto Storti
Centro Internacional de Metodos Computacionales
  en Ingenieria - CIMEC (INTEC/CONICET-UNL)
INTEC, Guemes 3450 - 3000 Santa Fe, Argentina
Tel/Fax: +54-342-4511594, cel: +54-342-156144983
e-mail: mstorti@intec.unl.edu.ar
http://www.cimec.org.ar/mstorti, http://www.cimec.org.ar
-------------------------

_________________________________________________________
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com


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


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

* Re: rest arguments in let-keywords
  2005-05-18  2:07 rest arguments in let-keywords Mario Storti
@ 2005-05-18 23:35 ` Clinton Ebadi
  2005-05-19  6:31   ` Thien-Thi Nguyen
  0 siblings, 1 reply; 4+ messages in thread
From: Clinton Ebadi @ 2005-05-18 23:35 UTC (permalink / raw)
  Cc: guile-user


[-- Attachment #1.1: Type: text/plain, Size: 613 bytes --]

On Tue, 2005-05-17 at 21:07 -0500, Mario Storti wrote:
> I want to use let-keywords, however it bothers to me the fact that the
> rest arguments keeps the keyword arguments, so that I have to write
> code to eliminate them. I read that this is for comptability with
> Common Lisp. Is there an easy way to get the rest arguments _without_
> the keyword arguments?
> 
> TIA, Mario
> 

Nope.
-- 
http://unknownlamer.org
AIM:unknownlamer IRC:unknown_lamer@fnode#tpu Jabber:clinton@hcoop.net
I use Free Software because I value freedom over features.
443E 4F1A E213 7C54 A306  E328 7601 A1F0 F403 574B

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 140 bytes --]

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

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

* Re: rest arguments in let-keywords
  2005-05-18 23:35 ` Clinton Ebadi
@ 2005-05-19  6:31   ` Thien-Thi Nguyen
  2005-05-19 11:56     ` Mario Storti
  0 siblings, 1 reply; 4+ messages in thread
From: Thien-Thi Nguyen @ 2005-05-19  6:31 UTC (permalink / raw)


   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


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

* Re: rest arguments in let-keywords
  2005-05-19  6:31   ` Thien-Thi Nguyen
@ 2005-05-19 11:56     ` Mario Storti
  0 siblings, 0 replies; 4+ messages in thread
From: Mario Storti @ 2005-05-19 11:56 UTC (permalink / raw)
  Cc: guile-user


>>>>> On Thu, 19 May 2005 02:31:17 -0400, 
>>>>>      Thien-Thi Nguyen <ttn@glug.org> said:

>    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

Thanks a lot... (In the meanwhile I wrote also a little procedure.) I
was just a little bit surprised that there is not a standard macro or
function for doing that.

Regards, Mario

-- 
-------------------------
Mario Alberto Storti     [cel. +54-342-156144983]
CIMEC (INTEC/CONICET-UNL), Guemes 3450 - 3000 Santa Fe, Argentina
Tel/Fax: +54-342-4511169 (ext 1015)
e-mail: mstorti at intec dot unl dot edu dot ar
http://www.cimec.org.ar/mstorti
-------------------------


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


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

end of thread, other threads:[~2005-05-19 11:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-18  2:07 rest arguments in let-keywords Mario Storti
2005-05-18 23:35 ` Clinton Ebadi
2005-05-19  6:31   ` Thien-Thi Nguyen
2005-05-19 11:56     ` Mario Storti

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).