Newbie problem: invalid context for definition
"Jon Kleiser" <[email protected]> Mon, 16 Apr 2007 20:55:15 +0200 (CEST)
| Newsgroups | gmane.comp.java.sisc.user |
|---|---|
| Message-ID | <[email protected]> |
When I try this little program, using sisc-1.16.6, ... (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)) (display i2) (newline) (define ds (desc-series i2)) (display ds) (newline) ;problem (if (= i n) 'done (loop (+ i 1))))))) (do-from-to 2 4) ... I get this: Error in load: evaluation error at file: ... ... Caused by Error: invalid context for definition (define ds (desc-series i2)) If I comment out the entire "problem" line, then I get no error. Why is "(define i2 (* i i))" OK and "(define ds (desc-series i2))" not? When I tried a slightly simplified version in the sisc-online.php, I got this: Error in =: expected type number, got '#!void'. Sincerey, 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/