[CM] dopairs

Rick Taube taube at uiuc.edu
Tue Jul 1 05:02:41 PDT 2003


yes, thank you! ill make the change in cvs right away. btw dopairs 
should allow any number of forms in its body so your explicit (begin 
...) is not necessary.

(dopairs (x y '(a 1 b 2 c 3))
   (display x)
   (display y)
   ...)



> I think, the error of an uneven pair list should get caught and assume
> it's due to a typo in the fourth last line of the dopairs definition.
>
> To fix this, change that line:
>
> -   (if (null? ,a)
>
> into
>
> +   (if (null? (cdr ,a))
>
> After replacement:
>
>     (dopairs (x y '(1 2 3 4 5))
>              (begin
>               (display (list x y))
>               (newline)))
>
>     guile> (1 2)
>     (3 4)
>     <unnamed port>: In procedure error in expression (error str):
>     <unnamed port>: Uneven pair list: (1 2 3 4 5)
>     ABORT: (misc-error)
>     guile>
>
> --
> Orm
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist




More information about the Cmdist mailing list