> On Aug 7, 2019, at 8:55 AM, Kevin Forchione <lyss...@gmail.com> wrote:
> 
> 
> 
>> On Aug 6, 2019, at 4:06 PM, Sorawee Porncharoenwase <sorawee.pw...@gmail.com 
>> <mailto:sorawee.pw...@gmail.com>> wrote:
>> 
>> (module B racket
>>   (require (submod ".." A))
>>   (printf "X=~a~%" X))
> 
> Why doesn’t printf display anything ? 

Oh, wait. modules are “lazy” until they’re required. Something like that. I 
think I’m beginning to understand. :) 

#lang racket


(module A racket
  (provide X)
  (define X 5)
  (printf "A.X=~a~%" X))

(module B racket
  (require (submod ".." A))
  (printf "B.X=~a~%" X))


(require ‘B)

Kevin

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/D38B2472-D673-49BB-AF89-1B9FF9A3EFC1%40gmail.com.

Reply via email to