diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2021-01-05 17:18:55 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2021-01-05 17:18:55 +0300 |
commit | 5d7eed48337ff1f9a30118f5d8be67c641bbfcf8 (patch) | |
tree | 918be41c07cd79cbf161103e7fd07d0241e54caa | |
parent | 94f089316ffbf2e2e74b0257355f7c390ff5262b (diff) | |
download | csx-5d7eed48337ff1f9a30118f5d8be67c641bbfcf8.tar csx-5d7eed48337ff1f9a30118f5d8be67c641bbfcf8.tar.xz csx-5d7eed48337ff1f9a30118f5d8be67c641bbfcf8.zip |
Added sx showcase.
-rw-r--r-- | examples/generated.csx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/generated.csx b/examples/generated.csx index f6eac72..14943b2 100644 --- a/examples/generated.csx +++ b/examples/generated.csx @@ -17,6 +17,16 @@ [set c [in]] [if [no [same c 10]] [pair c [instr]]] ]] +[set outints [fn [l] + [set outcontent [fn [l] + [if l [do [outint [head l]] [out 32] [outcontent [tail l]]]] + ]] + [out 91] [outcontent l] [out 93] +]] +[set rappend [fn [a b] [if a [rappend [tail a] [pair [head a] b]] b]]] +[set rev [fn [l] [rappend l []]]] +[set append [fn [a b] [rappend [rev a] b]]] +[set backwards [sx body [pair 'do [rev body]]]] [outstr "-= loaded =-"] [newline] @@ -30,3 +40,8 @@ [newline] [outstr "I have to go. Goodbye!"] [newline] + +[backwards + [outstr magic] + [set magic [rev "magic"]] +] |