Created
December 27, 2009 03:09
-
-
Save lsparrish/264138 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( A macro for appending code blocks. ) | |
{{ | |
: 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment