Example: Hello World
We step through the process of defining, parsing and executing a language using a trivial Hello World program. The program consists of two functions: hello
and hi
, of which the former takes a string as argument. When executed, the program greets the provided argument. For example:
> hello world
"Hello world! It is a great day today!"
> hello moon
"Hello moon! It is a great day today!"
> hi
"Hi mysterious person!"