Re: [Chicken-users] Named let*

2013-05-30 Thread Michele La Monaca
On Wed, May 29, 2013 at 11:22 PM, Michele La Monaca mikele.chic...@lamonaca.net wrote: On Wed, May 29, 2013 at 11:10 PM, Michele La Monaca mikele.chic...@lamonaca.net wrote: On Wed, May 29, 2013 at 10:20 PM, Patrick Li patrickli.2...@gmail.com wrote: Hi Michele, I realized after posting my

Re: [Chicken-users] Named let*

2013-05-29 Thread Jörg F . Wittenberger
On May 27 2013, Michele La Monaca wrote: R5RS doesn't specify this kind of syntax (nor Chicken supports it): (let* loop ((a init) (b a)) body) To me it seems a missing piece of syntax. Am I wrong? I've missed it occasionally as well, but I'm not sure it's *that* useful. Of course

Re: [Chicken-users] Named let*

2013-05-29 Thread Patrick Li
If I understand the OP correctly, he wants let* to imitate this macro. (define-syntax named-let* (syntax-rules () ((named-let* name ((var val) ...) body ...) (let* ((var val) ...) (let name ((var var) ...) body ...) -Patrick On Wed, May 29, 2013 at 5:47

Re: [Chicken-users] Named let*

2013-05-29 Thread Michele La Monaca
On Wed, May 29, 2013 at 2:47 PM, Jörg F. Wittenberger joerg.wittenber...@softeyes.net wrote: On May 27 2013, Michele La Monaca wrote: R5RS doesn't specify this kind of syntax (nor Chicken supports it): (let* loop ((a init) (b a)) body) To me it seems a missing piece of syntax. Am I

Re: [Chicken-users] Named let*

2013-05-29 Thread Michele La Monaca
On Wed, May 29, 2013 at 3:53 PM, Patrick Li patrickli.2...@gmail.com wrote: If I understand the OP correctly, he wants let* to imitate this macro. (define-syntax named-let* (syntax-rules () ((named-let* name ((var val) ...) body ...) (let* ((var val) ...) (let

Re: [Chicken-users] Named let*

2013-05-29 Thread Patrick Li
Hi Michele, I realized after posting my version of named-let*, that you actually *cannot* use it to accomplish all of what you want. For that you do need loop to be a syntactic extension, as mentioned by Jorg. For instance, my named-let* macro would not simplify the example you posted earlier:

Re: [Chicken-users] Named let*

2013-05-29 Thread Michele La Monaca
On Wed, May 29, 2013 at 10:20 PM, Patrick Li patrickli.2...@gmail.com wrote: Hi Michele, I realized after posting my version of named-let*, that you actually *cannot* use it to accomplish all of what you want. For that you do need loop to be a syntactic extension, as mentioned by Jorg. For

Re: [Chicken-users] Named let*

2013-05-29 Thread Michele La Monaca
On Wed, May 29, 2013 at 11:10 PM, Michele La Monaca mikele.chic...@lamonaca.net wrote: On Wed, May 29, 2013 at 10:20 PM, Patrick Li patrickli.2...@gmail.com wrote: Hi Michele, I realized after posting my version of named-let*, that you actually *cannot* use it to accomplish all of what you

Re: [Chicken-users] Named let*

2013-05-28 Thread Michele La Monaca
On Tue, May 28, 2013 at 2:06 AM, Jim Ursetto zbignie...@gmail.com wrote: On May 27, 2013, at 4:14 PM, Michele La Monaca mikele.chic...@lamonaca.net wrote: So writing down the options, we have: (let* loop ((i (random N)) (ch (string-ref buf i))) (do-something) (if

Re: [Chicken-users] Named let*

2013-05-27 Thread Michele La Monaca
R5RS doesn't specify this kind of syntax (nor Chicken supports it): (let* loop ((a init) (b a)) body) To me it seems a missing piece of syntax. Am I wrong? I've missed it occasionally as well, but I'm not sure it's *that* useful. Of course that's something we all can live without, but

[Chicken-users] Named let*

2013-05-24 Thread Michele La Monaca
Hi all, R5RS doesn't specify this kind of syntax (nor Chicken supports it): (let* loop ((a init) (b a)) body) To me it seems a missing piece of syntax. Am I wrong? Ciao, Michele ___ Chicken-users mailing list Chicken-users@nongnu.org

Re: [Chicken-users] Named let*

2013-05-24 Thread Peter Bex
On Fri, May 24, 2013 at 11:37:12PM +0200, Michele La Monaca wrote: Hi all, R5RS doesn't specify this kind of syntax (nor Chicken supports it): (let* loop ((a init) (b a)) body) To me it seems a missing piece of syntax. Am I wrong? I've missed it occasionally as well, but I'm not