This is the mail archive of the
guile@cygnus.com
mailing list for the Guile project.
Re: Constructs for programming with sequences
- To: guile@cygnus.com
- Subject: Re: Constructs for programming with sequences
- From: Valentin Kamyshenko <val@kamysh.materials.kiev.ua>
- Date: 01 Jun 1999 09:21:23 +0300
- References: <199905311843.UAA26099@mdj.nada.kth.se> <xy7hfot5atm.fsf@mdj.nada.kth.se>
>>>>> "Mikael" == Mikael Djurfeldt <mdj@nada.kth.se> writes:
Mikael> Mikael Djurfeldt <mdj@nada.kth.se> writes:
>> 1. Generation
>>
>> (map-index N PROC) --> LIST
Mikael> Another candidate for this one could be
Mikael> (for-map FROM TO STEPPER PROC)
Mikael> Maybe that looks even prettier in the code
Mikael> (for-map 1 10 1+ (lambda (i) i))
What about the implementation of CL (loop ...) construct?
(loop for i from 1 to (compute-top-value) ; first clause
while (not (unacceptable i)) ; second clause
collect (square i) ; third clause
do (format t "Working on ~D now" i) ; fourth clause
when (evenp i) ; fifth clause
do (format t "~D is a non-odd number" i)
finally (format t "About to exit!")) ; sixth clause
--
Best regards,
Valentin.