blang/example/meta_programming.blang

19 lines
603 B
Plaintext

^{?>!&++*<!%&++*<<%&+*<
%&+*<>%&+*<^%<!}
^; zero out hand
{?>; set return point; if hand is non-zero, print hand
!&++*; palm the chart; add 2 to palm; splat the new chart
<!%; write '!' to the new chart position
&++*; palm the chart; add 2 to palm; splat the new chart
<<%; write '<' to the new chart position
&+*; advance the chart one space
<
%; write '\n' to the new chart position
&+*; advance the chart one space
<>%; write '>' to the new chart position
&+*; advance the chart one space
<^%; write '^' to the new chart position
<!; palm '!'
}; return