Next: Combining Blocks, Up: Blocks [Contents]
Blocks are run using the run-block
function.
(run-block ruby-hello-world)
run-block
returns a new block, identical to the previous block but
with the #:results
field set. If the #:results
field is already
set to a truthy value, the evaluator is not run and the same block is
returned.
It is possible to run a block at the same time it is created by
passing #:run? #t
to make-block*
or define-block
.
(block-result (make-block* #:code "print(10 + 9)" #:language ruby #:run? #t)) ;=> "19"