With this macro loaded, you can append code to a string and evaluate the results easily.
( A macro for appending code blocks. )
{{
ifNotExists prepend { : prepend ( $$-$ ) here -rot 2 for dup here swap getLength dup allot copy next 0 , ; }
: $space ( $-$ ) s" " prepend ;
---reveal---
: append-block 32 accept tib @ char: { =if
char: } accept tib tempString keepString literal,
` $space ` swap ` prepend then ; compile-only
: code ( "- ) ` append-block ` dup ` getLength ` eval ; compile-only
}}
: access ( n"- ) 32 accept tib code { + @ . } ;
create mylist 1 , 2 ,
0 access mylist