Professional Documents
Culture Documents
Rules To Racket By: pd8 hw15 2021-04-05 Alif Miah Worked With No One Advised by No One
Rules To Racket By: pd8 hw15 2021-04-05 Alif Miah Worked With No One Advised by No One
rules to Racket by
capability sample Racket code Why would a form of the steps that Racket takes as it implements or provides
that uses the capability programmer language the capability
use this?
Racket can…
(define pi 3.14) To never type (define symbol 1. Check the symbol table for a slot
the same expression ) 2. Make a new slot for the symbol
…bind a value to a thing twice 3. Put the value in the symbol table
symbol
…retrieve a value (display pi) To never type (display 1. Check the symbol table
that was the same symbol 2. Retrieve the value from the symbol table
previously bound thing twice expression ) 3. Use the value
to a symbol
…evaluate an (display (* 4 3)) To calculate (display 1. Read the expression left to right
expression the value of an expression ) 2. Do the expression
expression
…produce dots of (display “hello” To use (define omitted for this capability, since that implementation is
light in the “values”) hidden inside how DrRacket works, and outside the
interactions scope of this course
window, to
represent a value
in a form that a
human can read