Commit 69cece4c authored by Dan Holtby's avatar Dan Holtby
Browse files

start documentation

parent acd46902
#lang info
(define collection "uwaterloo-racket")
(define deps '("base"))
(define build-deps '("scribble-lib" "racket-doc" "rackunit-lib"))
(define deps '("drracket-plugin-lib"
(define build-deps '("scribble-lib" "racket-doc"))
(define scribblings '(("scribblings/uwaterloo-racket.scrbl" ())))
(define pkg-desc "University of Waterloo Racket plugins and libraries")
(define version "0.0")
#lang scribble/manual
scribble/example racket/sandbox
@(define my-eval
(parameterize ([sandbox-output 'string]
[sandbox-error-output 'string]
[sandbox-memory-limit 50])
(make-evaluator 'racket)))
@title{UWaterloo Racket}
Package Description Here
@section{The trace module}
Racket has a useful tracing tool. Unfortunately it does not work in Beginning Student.
We have provided a wrapper to work around this issue. To use it, you must add
@racket[(require uwaterloo-racket/trace)] to the top of your file (just below the header).
This allows you to use the @racket[define/trace] special form.
@defform[(define/trace (name param ...) body)
]{Behaves the same as @racket[define], but whenever the function @racket[name] is applied,
the values of its parameters will be printed to the screen.
When the function produces a value, that value will also be printed.
@examples[#:eval my-eval
(require uwaterloo-racket/trace)
(define/trace (f x)
(+ 2 x))
(f 2)]
@examples[#:eval my-eval
(require uwaterloo-racket/trace)
(define/trace (sum-nums n)
(cond [(zero? n) 0]
[else (+ n (sum-nums (- n 1)))]))
(sum-nums 3)]}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment