Hi,

is it expected behaviour that (a) does not work but (b) does?

a) define after begin

  (define rec-1 (lambda (depth)
    (if (fx< 0 depth)
      (begin
        (define x 
          (string-append "depth: " (number->string depth)))
        (rec-1 (fx- depth 1))
        (print x)))))

b) define after let

  (define rec-1 (lambda (depth)
    (if (fx< 0 depth)
      (let ()
        (define x 
          (string-append "depth: " (number->string depth)))
        (rec-1 (fx- depth 1))
        (print x)))))


chicken tools - reacting to (a):

Chicken 4:
  csi: Note: the following toplevel variables are referenced but unbound:
    x (in rec-1)

  csc (default parameter): no comment

Chicken 5:

  csc (default parameter): error

lg
Martin

_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to