Newbie problem: naked left-hand reference

"Jon Kleiser" <[email protected]> Thu, 19 Apr 2007 21:22:22 +0200 (CEST)
Newsgroups gmane.comp.java.sisc.user
Message-ID <[email protected]>
Thanks for explaining the "context for definition" thing! It helped me a
lot. My first sisc program is now actually running, and it's quite fast.
There is, however, one more error message that I've had that I don't quite
understand. If I just remove a couple of expressions from my little sample
program, so that it looks like this:

(define desc-series
	(lambda (size)
		(let countdown ((n size) (s ()))
			(if (= n 0) s
				(countdown (- n 1) (append s (list n)))))))

(define do-from-to
	(lambda (m n)
		(let loop ((i m))
			(begin
				(define i2 (* i i))
				(define ds (desc-series i2)) (display ds) (newline)
				(if (= i n) 'done
					(loop (+ i 1)))))))

(do-from-to 2 4)

Then, why do I get things like this:

{warning: naked left-hand reference in letrec rhs: '%%_nNWd_9Tf51_i2'.}
...
Caused by Error in =: expected type number, got '#!void'.

---

I also have another question:
What's the easiest way to meassure how long a part of a sisc program takes
to execute?

/Jon


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/