 
 ARTICLE: "literals" "Interpolating code results into literal values"
 "The " { $vocab-link "literals" } " vocabulary contains words to run code at parse time and insert the results into more complex literal values."
-{ $example """
-USE: literals
-IN: scratchpad
-
-CONSTANT: five 5
-{ $ five $[ five dup 1 + dup 2 + ] } .
-    """ "{ 5 5 6 8 }" }
+{ $example
+    "USING: kernel literals math prettyprint ;"
+    "IN: scratchpad"
+    ""
+    "<< CONSTANT: five 5 >>"
+    "{ $ five $[ five dup 1 + dup 2 + ] } ."
+    "{ 5 5 6 8 }"
+}
 { $subsections
     POSTPONE: $
     POSTPONE: $[

{ $description "Calls " { $snippet "code" } " at parse time and adds the result(s) to the parser accumulator." }
{ $notes "Since " { $snippet "code" } " is " { $link call } "ed at parse time, it cannot reference any words defined in the same compilation unit." }
{ $examples

    { $example """
USING: kernel literals math prettyprint ;
IN: scratchpad

<< CONSTANT: five 5 >>
{ $[ five dup 1 + dup 2 + ] } .
    """ "{ 5 6 8 }" }

} ;

HELP: ${

{ $description "Executes " { $snippet "word" } " at parse time and adds the result(s) to the parser accumulator." }
{ $notes { $snippet "word" } "'s definition is looked up and " { $link call } "ed at parse time, so words that reference words in the current compilation unit cannot be used with " { $snippet "$" } "." }
{ $examples
    { $example
        "USING: kernel literals prettyprint ;"
        "IN: scratchpad"
        ""
        "CONSTANT: five 5"
        "{ $ five } ."
        "{ 5 }"
    }
    { $example
        "USING: kernel literals prettyprint ;"
        "IN: scratchpad"
        ""
        ": seven-eleven ( -- a b ) 7 11 ;"
        "{ $ seven-eleven } ."
        "{ 7 11 }"
    }
} ;

HELP: $[
