chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Internal Definitions / begin


From: Martin Schneeweis
Subject: [Chicken-users] Internal Definitions / begin
Date: Mon, 16 Jul 2018 15:51:09 +0200

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]