> On Apr 28, 2015, at 11:35 AM, Alexej Magura <[email protected]> wrote:
> 
> 
> Message: 5
> Date: Tue, 28 Apr 2015 10:15:28 +0200
> From: Christian Kellermann 
> <[email protected]>
>> 
>> Message: 5
>> Date: Tue, 28 Apr 2015 10:15:28 +0200
>> From: Christian Kellermann 
>> <[email protected]>
>> 
>> To: 
>> [email protected]
>> 
>> Subject: Re: [Chicken-users] do* implementation
>> Message-ID: 
>> <[email protected]>
>> 
>> Content-Type: text/plain
>> 
>> Alexej Magura 
>> <[email protected]>
>>  writes:
>> 
>>> I thought about writing my own, but I'm a bit rusty with scheme atm
>>> and I couldn't figure out where 
>>> /do/
>>>  is defined in Chicken's source
>>> code, so I don't think I'd be able to implement it efficiently.
>>> 
>> It's defined in expand.scm:1261 in CHICKEN core, as it's syntax. 
>> 

Suspect you will need to write your own. The definition at expand.scm:1261 is 
for the ‘do’ form:

(do ((a '(1 2 3 4 5) (cdr a))
      (b (car a) (car a)))
     ((eq '() a))
     (print b))

=>

(##core#app
  (##core#letrec*
    ((doloop
       (##core#loop-lambda
         (a b)
         (##core#if
           (eq (##core#quote ()) a)
           (##core#undefined)
           (##core#begin
             (##core#let () (print b))
             (##core#app doloop (cdr a) (car a)))))))
    doloop)
  (##core#quote (1 2 3 4 5))
  (car a))

>> 
>> HTH,
>> 
>> Christian
>> 
>> 
>> -- 
>> May you be peaceful, may you live in safety, may you be free from
>> suffering, and may you live with ease.
>> 
>> 
>> 
>> 
>> ------------------------------
>> 
>> _______________________________________________
>> Chicken-users mailing list
>> 
>> [email protected]
>> https://lists.nongnu.org/mailman/listinfo/chicken-users
> 
> Oh, guess grep must have missed it somehow... anyway, thanks, Christian.
> 
> _______________________________________________
> Chicken-users mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/chicken-users


_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to