When two modules provide functions with the same name, you can rename functions when importing.
An easy way to do this is to rename all the functions from one of the modules, renaming them all using some common prefix. You can do this with the prefix-in modifier to require :
(require racket/draw) (require (prefix-in htdp: 2htdp/image)) make-pen ; the `make-pen` from racket/draw htdp:make-pen ; the `make-pen` from 2htdp
By the way, there is nothing special in : this is just the agreement I saw. Instead of htdp: prefix can be (say) htdp- . No matter what you use, it is added to every name provided by this module.
If only one function name conflicts, you can rename only one function from one of the modules using rename-in .
See require more details.
Greg Hendershott
source share