mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-10 00:38:47 +00:00
Added tutorial
This commit is contained in:
parent
b7271d167a
commit
b0e5bc26e3
10 changed files with 153 additions and 6 deletions
12
tutorial/Hello.lama
Normal file
12
tutorial/Hello.lama
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
printf ("Hi, this is Lama...\n");
|
||||
printf ("I can construct values of various shapes,\n");
|
||||
printf ("convert them into strings and print. Here you are:\n");
|
||||
|
||||
printf ("Regular integers: %d or even %s\n", 3, 3.string);
|
||||
printf ("Lists: %s\n", {1, 2, 3}.string);
|
||||
printf ("Arrays/tuples: %s\n", [1, 2, 3].string);
|
||||
printf ("S-expressions: %s\n", Man ("Jonh", "Smith").string);
|
||||
printf ("Functions: %s\n", fun (x, y) {x+y}.string);
|
||||
printf ("These structures can be nested and heterogeneous: %s\n", {[1, "2"], Apple, fun (x) {Melon (3)}}.string);
|
||||
|
||||
printf ("That's all for now, bye!\n")
|
||||
Loading…
Add table
Add a link
Reference in a new issue