Skip to content
cosmos-lang edited this page Dec 17, 2022 · 3 revisions

1. Syntax

Types Data
String "str"
Number 1, 2.5
Relation rel(x) true;
Functor Tuple(x)
List [1,'2']
Table {x=1 and y='2'}
Operators
and,or
if,when,choose
not,once
Arithmetic Operators
+ - * /
< > <= >= = !=
Conversion (casting)
str
int
num, real

Common syntax sugar

Syntax Output
#str size(str)
t.x table.get(t,'x')
t[x] table.get(t,x)
t.x:2 table.set(t,x,2)
:f(2) functor
x in l has(l,x)