|(require literify)||package: literify|
Default Scribble or scribble/lp2 doesn’t allow you to have some code both displayed and executed at the same time. This library provides several forms to enable this functionality.
For example, putting the below lines in your scribble document not only displays it, but also executes it. Displaying and executing code is done by code/eval:
@code/print[ (string-append "hello " name)]
(code/eval expr ...)
This form is usually used to defining valuables, functions, structs, etc. It can also be used to display pictures.
If you want to display the result of some expression, use code/format and its derivatives.
(code/display expr ...)
(code/print expr ...)
(code/write expr ...)