UNB/ CS/ David Bremner/ teaching/ cs4613/ tutorials/ Racket modules

Background

What to do

Corequisites
tests

In quick we covered the Quick tutorial section on modules We've also been using modules as part of unit testing. In this section of the lab we we will further explore modules, submodules, require and provide.

    #lang racket
    (define (hello) (displayln "Hello world!"))
    (check-equal? (with-output-to-string hello) "Hello world!\n")
    (check-equal? (with-output-to-string hello) (begin (sleep 3) "Hello world!\n"))