[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Newbie seeks guiding hands.
From: |
Rob Browning |
Subject: |
Re: Newbie seeks guiding hands. |
Date: |
23 Mar 2001 11:07:34 -0600 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
Gary Benson <address@hidden> writes:
> How do modules work? Would they, for instance, allow me to write a
> function called evaluate, safe in the knowledge that it would not
> conflict with functions called evaluate in other parts of the code?
Exactly. So you can say:
(define-module (benson-project good-bits)
:use-module (ice-9 slib))
;; or just (use-modules (ice-9 slib)) here instead...
(define (some-local-function x y z)
;; whatever
result)
(define (some-global-function a b c d)
(+ (some-local-function a b c)
d))
(export some-global-function)
Now if other code calls
(use-modules (benson-project good-bits))
they'll be able to use some-global-function, but won't be able to see
some-local-function...
Hope this helps.
--
Rob Browning <address@hidden> PGP=E80E0D04F521A094 532B97F5D64E3930
- Re: Newbie seeks guiding hands., (continued)
- Re: Newbie seeks guiding hands., Rob Browning, 2001/03/22
- Re: Newbie seeks guiding hands., Rob Browning, 2001/03/22
- Re: Newbie seeks guiding hands., Gary Benson, 2001/03/23
- Re: Newbie seeks guiding hands., Ian Grant, 2001/03/23
- Re: Newbie seeks guiding hands., Rob Browning, 2001/03/23
- Re: Newbie seeks guiding hands., Gary Benson, 2001/03/23
- Re: Newbie seeks guiding hands., Martin Grabmueller, 2001/03/23
- Re: Newbie seeks guiding hands.,
Rob Browning <=
- Re: Newbie seeks guiding hands., Gary Benson, 2001/03/23
- Re: Newbie seeks guiding hands., Rob Browning, 2001/03/23