PasteRack.org
Paste # 54614
2020-04-03 03:58:03

Fork as a new paste.

Paste viewed 397 times.


Embed:

redefining functions in modules

  1. #lang racket
  2.  
  3. (compile-enforce-module-constants #f)
  4.  
  5. (module m racket
  6.   (provide hello)
  7.   (define (hello x) (displayln (string-append "hello " x))))
  8.  
  9. (require 'm)
  10.  
  11. (thread (lambda () (do () (#f) (hello "dude") (sleep 5))))
  12.  
  13. (module m racket
  14.   (provide hello)
  15.   (define (hello x) (displayln (string-append "helloooo " x))))

=>