On Wed, 2006-06-14 at 01:17 +0100, Neil Jerram wrote:
> > +GUILE_CHECK([GUILE_CORRECT_VERSION_P],
> > +[(exit (let loop ((v1 (map string->number (string-split (version)
> > (string-ref \".\" 0
> > + (v2 (map string->number (string-split \"$1\" (string-ref
> > \".\" 0)
>
>
Aaron VanDevender <[EMAIL PROTECTED]> writes:
> Here is a slightly improved version of my guile.m4 patch. It has some
> more explicit comments and uses the guile executable set by GUILE_PROGS
Thanks for working on this. I have a couple of queries.
> +GUILE_CHECK([GUILE_CORRECT_VERSION_P],
> +
If you make "multiple values" first-class then you get into an
interesting and useful design space. See the XQuery language
(http://www.w3.org/XML/Query and http://www.w3.org/TR/xquery/).
Its values are "sequences" of "items". The difference between a
list and a sequence is that sequences don't
Ah... great minds DO think alike!
Regards,
Jon
Neil Jerram wrote:
Jon Wilson <[EMAIL PROTECTED]> writes:
The intermediate step (after the macro expansion I guess) would look like
(+ 1 2)
==>
3
It seems like this would make multiple values much much more useful.
I've often thought that too.
Jon Wilson <[EMAIL PROTECTED]> writes:
> The intermediate step (after the macro expansion I guess) would look like
>
> (+ 1 2)
> ==>
> 3
>
> It seems like this would make multiple values much much more useful.
I've often thought that too. IMO multiple values per R5RS are a
pretty half-baked conc
szgyg <[EMAIL PROTECTED]> writes:
> (define-macro (values->list vs)
> `(call-with-values (lambda () ,vs) list))
>
> (apply + (values->list (values 1 2 3)))
Yes, but why does this need to be a macro?
(define (values->list vs)
(call-with-values (lambda () vs) list))
> or
>
> (define-macro (
Hi szgyg,
szgyg wrote:
No, this is impossible without redefining +. A macro produces 1 sexp,
not more.
This is exactly what I am getting at. values does return more than 1
sexp, but the mechanisms for using that are clumsy and painful. It
seems that if values returns multiple s-expressions
Hi Neil,
Neil Jerram wrote:
Jon Wilson <[EMAIL PROTECTED]> writes:
(define-macro (dyn-set! var val)
`(begin (if (not (defined? (quote ,var)))
(primitive-eval `(define ,(quote ,var) #f)))
(set! ,var ,val)))
(defined? 'undefined-symbol)
Hello,
Is there a way to catch an "unbound-variable" exception, bind the
variable on the fly, and continue execution as if the exception didn't
occurs ?
I'd like to catch this exception in a c function: the exception context
should be available, to retrieve the variable or function name. This
h
Jon Wilson wrote:
Is there any sensible way to implement the following semantics:
(+ (values 1 2))
==>
3
>
Or perhaps with a macro of some sort (but preferably as above)...
(+ (values->list-elements (values 1 2)))
==>
3
! untested code !
(define-macro (values->list vs)
`(call-with-value
Here is a slightly improved version of my guile.m4 patch. It has some
more explicit comments and uses the guile executable set by GUILE_PROGS
Index: guile.m4
===
RCS file: /sources/guile/guile/guile-core/guile-config/guile.m4,v
retrie
11 matches
Mail list logo