guile-user
[Top][All Lists]
Advanced

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

Re: Getting scheme error informations when running scheme code from C


From: Stephen Compall
Subject: Re: Getting scheme error informations when running scheme code from C
Date: Sun, 11 Sep 2005 16:12:52 -0500

On Sun, 2005-09-11 at 22:19 +0200, Christian Mauduit wrote:
> FYI I use the following code instead, to display args:
> 
> (apply format (cons #f (cons (cadr args) (caddr args))))
> 
> Unelegant in the source, but displays things in a nicer way IMHO.

This is common enough -- requiring some arguments, then providing a rest
argument -- that apply handles it for you:

(apply format #f (cadr args) (caddr args))

Only the last argument must be a list; arguments from the second onward,
but the last one, are effectively consed on to the front of the last
argument (a list), as you do manually.

-- 
Stephen Compall
http://scompall.nocandysoftware.com/blog

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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