-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expressions
Andrew Johnson edited this page Nov 15, 2024
·
11 revisions
LSTS Expressions are implemented as Lambda Calculus terms, however they are written with a C-Style syntax.
Numbers form a pyramid starting from small Integers ranging up to Floating Point Real Numbers, etc.
print( 1 + 2 * 3.4 / 5e10 );
Strings and Character Literals follow C syntax.
print( "ab" + "c" ); // Strings
print( 'a' ); // Characters
Lists and Arrays can be expressed with square brackets.
print([ 1, 2, 4, 9, 10 ]);
Sets and Maps can be expressed with curly braces.
print({ 1, 2, 2, 3, 4 });
print({ 1:2, 3:4, 5:6 });
For loop syntax can be used to construct collections iteratively.
print([for x in iterator yield x**3]);
print({for x in iterator yield x**3]);
print({for x in iterator yield x:x**3]);
The LSTS source code and documentation are released under the terms of the attached permissive MIT license. This license is intended only to protect the future development of the project while otherwise allowing people to use the code and IP as they would like. Please, just be nice.