chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Questions about modules


From: Jack Trades
Subject: [Chicken-users] Questions about modules
Date: Mon, 15 Jun 2009 17:54:20 -0400

I have a few questions about modules.  I previously posted a problem with 'define-values' when importing chicken with a prefix.  I also have this (or a slightly different) problem with 'and'.

;; This works
(module test (a)
(import scheme)
(define (a x y) (and x y)))

;; This fails
(module test (a)
(import (prefix scheme s.))
(s.define (a x y) (s.and x y)))
;;===> Warning: reference to possibly unbound identifier: and

;; This also fails
(module test (a)
(import (prefix scheme s.))
(s.define (a x y) (and x y)))
;;===> Warning: reference to possibly unbound identifier: and



The manual says: A module is initially empty (has no visible bindings).  But I've noticed that some identifiers are available without importing anything.  Is there a list of these identifiers?  I've come up with the following through testing...
#t, #f, if, lambda, let, letrec, define-syntax, import

;; Example:
(module test ()
(lambda (x y)
  (if x x
       (if y y
             #f))))


Jack Trades

reply via email to

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