Skip to content

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

Numbers form a pyramid starting from small Integers ranging up to Floating Point Real Numbers, etc.

print( 1 + 2 * 3.4 / 5e10 );

String and Character Literals

Strings and Character Literals follow C syntax.

print( "ab" + "c" ); // Strings

print( 'a' ); // Characters

Collections

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]);
Clone this wiki locally