#lang racket (require "add-with-memory.rkt") (define + add) ;; We can use the new + here in the file, or in the REPL after we run this ;; file. ;; ------------------------------------------------------------------------- ;; If we know we want to define + to be the imported add function, there is ;; an alternative way to import the function: ;; (require (rename-in "add-with-memory.rkt" (add +))) ;; ;; Doing so affects the meaning of + only in this file. ;; ;; 'require' offers a number of handy ways to import functions from another ;; file, much as Python's import feature does. ;; ;; 'provide' also offers a number of handy ways to export a file, as we saw ;; in the comment at the end of "add-with-memory.rkt". ;; -------------------------------------------------------------------------