From e96facabd92d3eb61a4f97dfc3436a34dae4812d Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Mon, 4 Jan 2021 17:43:58 +0300 Subject: Example improved. --- examples/generated.csx | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'examples') diff --git a/examples/generated.csx b/examples/generated.csx index 8710bd6..4c405c4 100644 --- a/examples/generated.csx +++ b/examples/generated.csx @@ -12,17 +12,29 @@ [set map [fn [f l] [if [no l] [] [pair [f [head l]] [map f [tail l]]] ]]] -[map [fn [n] [outint n] [out 10]] - [quote [99 37 73 42]] -] [set id [fn args args]] -[outint [[id 42 13 31] 2]] -[out 10] -[out ["Hello!" 1]] -[out 10] [set outstr [fn [str] [if str [do [out [head str]] [outstr [tail str]]] [] ]]] -[outstr "Hello, World!"] -[out 10] +[set newline [fn [] [out 10]]] +[set instr [fn [] + [set c [in]] + [if [same c 10] + [] + [pair c [instr]] + ] +]] + +[outstr "-= loaded =-"] +[newline] +[outstr "Hello, I am Conrad S. Xylander. What is your name?"] +[newline] +[outstr "> "] +[set name [instr]] +[outstr "Nice to meet you, "] +[outstr name] +[outstr "."] +[newline] +[outstr "I have to go. Goodbye!"] +[newline] -- cgit v1.2.3