std.vm.toy-interpreter

+block-context+

+primitives+

block-zip

(block-zip root)

creates a zipper for block

eval-primitive

(eval-primitive op args)

expression?

(expression? b)

checks if a block is an expression (not whitespace/comment)

find-redex

(find-redex z)

finds the next reducible expression zipper location

find-redex-list

(find-redex-list z)

get-expressions

(get-expressions b)

gets all non-whitespace children

highlight-node

(highlight-node z)

list-expression?

(list-expression? b)

lookup-symbol

(lookup-symbol sym env)

looks up a symbol in the environment

macro?

(macro? op)

reduce-expression

(reduce-expression z env)

reduces the expression at the zipper

run

(run code-str)

run-form

(run-form form)

step

(step z env)

substitute

(substitute body bind-sym bind-val)

symbol-token?

(symbol-token? b)

value?

(value? b)

checks if a block is a fully reduced value

visualize

(visualize z)