Sam answered your question.  Here's how one can usually answer the more general question...

* The documentation for most Racket modules will usually say what `require` form you need to import it, assuming that you are using the `racket/base` language.  For example, if you're looking at the documentation for `make-temporary-file` in your Web browser, such as with the URL:
https://docs.racket-lang.org/reference/Filesystem.html#(def._((lib._racket%2Ffile..rkt)._make-temporary-file))
then you can usually scroll up, and see the `(require racket/file)`.  The appropriate `require` is usually in the documentation, since the Scribble documentation tool encourages the library author to put it there.  (BTW, though you'll notice that, in this particular example, the URL itself already says `racket/file`, but that's only because I used a direct URL to it; you'll often be looking at things in the documentation without a direct URL fragment reference to them.)

* Another way you can sometimes find this information using the documentation is in the search results.  For example, if you remember how to use `make-temporary-file`, but forget which module it's in, you can quickly see the module in the search results, without clicking through to the documentation for it.  For example, in the search results for:
https://docs.racket-lang.org/search/index.html?q=make-temporary-file
you'll see:
    make-temporary-file  provided from racket/file, racket

Some code editor you use might suggest which modules you need to `require`, or even automatically insert `require` forms for you. But using that too early can make it a crutch that discourages you from getting comfortable with using the documentation. Documentation is one of the biggest fundamentals in software engineering.  Try not to rely too much on automagical conveniences, to do things that you don't already know how to do manually, or that might need your judgment or insight.

(BTW, for "professional quality" purposes, one should normally use `#lang racket/base`, just as in the example you gave, rather than use `#lang racket`.  `#lang racket` is for quick throwaway code or for illustrating examples, when you don't want to bother saying `require` much, and don't mind that it adds dependencies on a lot of modules that you probably don't need.)

--
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to