verified to pass 2025/2026
Racket History - correct answer ✔- Lisp->scheme->racket
- Real-eval-print loop
- Prefix notation
string - correct answer ✔"a"
symbol - correct answer ✔'a
quoted list - correct answer ✔'(a b 1 (2 3 4))
- needs quote or it will evaluate
side effects - correct answer ✔what it prints to the screen, reads from files, setting a global variable
etc.
if statement - correct answer ✔(if <test><true><false>)
and statement - correct answer ✔(and <test1><test2>...)
- if all tests are true returns true, else false
or statement - correct answer ✔(or <test1><test2>...)
- if one test is true, returns true, else false
cond statement - correct answer ✔(cond [test1 result1]
, [test 2 result2]
[else result_else])
lambda function - correct answer ✔(lambda (arg1 arg2 ... argn) body-expr)
local binding - correct answer ✔(let ([v1 val1]
[v2 val2]
...
[vn valn] body)
- v1, v2, vn can be used in body only
pairs - correct answer ✔- lists are constructed from pairs
'(3 . (4 . (5 . ( ))))
(2 . 3) is dotted pair notation
vectors - correct answer ✔#(v0 v1 v2 ... vn-1)
(vector-ref vec i): returns element at index location i
quasi quoting - correct answer ✔- put backwards quote
- values with commas before are unquoted
- @ sign splices values of a list (gets rid of brackets around a list)
apply - correct answer ✔(apply f list-of-args)
- evaluates f using the items