Primora Language Dictionary
Welcome to the definitive dictionary of Primora! Here you'll find every keyword, concept, and idiom explained with examples.
Table of Contents
Keywords
| Keyword |
Description |
Example |
if |
Conditional branching |
if (x > 0) { ... } |
else |
Alternate branch |
else { ... } |
plot |
Plot a variable |
plot x as "Title" |
echo |
Print to output |
echo "Hello" |
summarize |
Summarize a variable |
summarize text as summary |
fetch |
Fetch data from a URL |
fetch url("https://...") as data |
search |
Search for information |
search "query" as result |
| ... |
... |
... |
Operators
| Operator |
Description |
Example |
+ |
Addition |
a + b |
- |
Subtraction |
a - b |
* |
Multiplication |
a * b |
/ |
Division |
a / b |
| ... |
... |
... |
Types
| Type |
Description |
Example |
int |
Integer |
x = 42 |
float |
Floating point |
y = 3.14 |
string |
Text string |
name = "Primora" |
| ... |
... |
... |
Built-in Functions
| Function |
Description |
Example |
translate() |
Translate text |
translate "hello" to "fr" |
summarize() |
Summarize text |
summarize text as summary |
| ... |
... |
... |
Standard Library
Primora comes with a rich standard library for data, AI, web, and more. See the book for details.
Idioms
- Chained Operations:
a = b + c * d
- Conditional Assignment:
if (x > 0) { y = 1 } else { y = -1 }
- Data Fetching:
fetch url("https://api") as data
For more, see the Primora Book and Guides.