[CM] Loop bug?

Richard Wentk richard at wentk.com
Thu Feb 12 05:10:45 PST 2015


I’m working through the examples using the Mac App Store version of Grace. 

This example in midioutput.scm produces an unbound variable error for ‘chord':

(loop with chord = (transpose (pick '(0 3 7)
                                    '(0 4 7)
                                    '(0 3 7 10)
                                    '(0 4 7 10)
                                    '(0 4 7 11))
                              (between 48 80))
      for k in chord
      do (mp:midi :key k))

A simplified version does the same thing for q:

(loop with q = '(1 2 3) for i in q do (print i))

Is this a bug, or am I missing something obvious? AFAICT the code is valid in Scheme and should work...

The equivalent SAL example works fine.

Thanks!

Richard



More information about the Cmdist mailing list