unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Backquote simplification
@ 2010-12-09 11:00 Hans Aberg
       [not found] ` <CCCBC725-4AE9-4585-B18D-7DF6650D5880@mac.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Aberg @ 2010-12-09 11:00 UTC (permalink / raw)
  To: guile-user

Is it possible to simplify the backquote construct `(,x_1 ... ,x_k)  
(always unquote on all arguments) somehow, so that the unquote does  
not need to appear multiple times (depending on k)? (I construct these  
in the C-interface, and it would simplify not having to remove a  
sequence of them.)

Specifically, in
   (define g (lambda (x . y) `(,x . ,y)))
then evaluations like (g 1 2 3), (g 1 2 . (3 4)) work.

So I would want something like
   (define g (lambda (x . y) (b x . y))))
where (b x . y) might be any expression where the unquote does not  
need to appear on every variable. Only combinations line
   (define g (lambda (x . y) (b `(,x . ,y))))
seem to work.

   Hans





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

end of thread, other threads:[~2010-12-11 10:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-09 11:00 Backquote simplification Hans Aberg
     [not found] ` <CCCBC725-4AE9-4585-B18D-7DF6650D5880@mac.com>
2010-12-09 19:44   ` Hans Aberg
2010-12-10 23:12     ` Neil Jerram
2010-12-11  0:03       ` Hans Aberg
2010-12-11  0:25         ` Neil Jerram
2010-12-11  8:33           ` Hans Aberg
2010-12-11 10:01             ` Neil Jerram
2010-12-11 10:09               ` Hans Aberg

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