[Top][All Lists]

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

Re: parallel with no exprs

From: Kevin Ryde
Subject: Re: parallel with no exprs
Date: Thu, 12 Jun 2003 11:54:26 +1000
User-agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux)

Mikael Djurfeldt <address@hidden> writes:
>       (use-modules (ice-9 threads))
>       (call-with-values
>           (lambda ()
>               (display "hello\n")
>             (parallel))
>         (lambda ()
>           (display "hi\n")))

I get

        ERROR: Wrong number of arguments to #<procedure #f ()>

I'd seen (parallel) expanding to (begin), which was what made me think
it was the (begin) that might not be right, since the following gives
the same error.

            (lambda ()
              (display "hi\n")
          (lambda ()
            (display "bye\n")))

> (lambda () (parallel)) correctly yields an error
> message since that is a lambda with no expressions in the body.

Ah, somehow I missed that (lambda () (begin)) is itself an empty body.
Bit subtle that, since of course it doesn't look empty :-).

reply via email to

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