Storing and working with data
In Ifá-Lang, you declare variables using ayanmo (Yoruba: "destiny") or its English alias
let:
// Declaring variables (Yoruba style)
ayanmo oruko = "Ifá";
ayanmo iye = 42;
// Declaring variables (English style)
let name = "Ifá";
let count = 42;
In Yoruba philosophy, ayanmọ́ means "destiny" or "fate". When you declare a variable, you're declaring its destiny — what it will hold.
Ifá-Lang has these built-in types:
| Type | Example | Description |
|---|---|---|
Number |
42, 3.14 |
Integers and floats |
String |
"Hello" |
Text enclosed in quotes |
Boolean |
otito, iro |
True (otito/true) or False (iro/false) |
List |
[1, 2, 3] |
Ordered collection |
Nil |
nil |
Absence of value |
// Numbers
ayanmo age = 25;
ayanmo price = 19.99;
ayanmo total = age + price; // 44.99
// Strings
ayanmo first = "Ọba";
ayanmo last = "Adé";
ayanmo full = first + " " + last; // "Ọba Adé"
// Booleans
ayanmo active = otito; // true
ayanmo complete = iro; // false
// Lists
ayanmo numbers = [1, 2, 3, 4, 5];
ayanmo names = ["Ọba", "Adé", "Ifá"];
// Numbers
let age = 25;
let price = 19.99;
let total = age + price; // 44.99
// Strings
let first = "Ọba";
let last = "Adé";
let full = first + " " + last; // "Ọba Adé"
// Booleans
let active = true;
let complete = false;
// Lists
let numbers = [1, 2, 3, 4, 5];
let names = ["Ọba", "Adé", "Ifá"];
Use Ogbe.type() (or Sys.type()) to check a value's type:
ayanmo x = 42;
ayanmo t = Ogbe.type(x);
Irosu.fo(t); // "number"
ayanmo s = "Hello";
Irosu.fo(Ogbe.type(s)); // "string"
ayanmo list = [1, 2, 3];
Irosu.fo(Ogbe.type(list)); // "list"
let x = 42;
let t = Sys.type(x);
Fmt.println(t); // "number"
let s = "Hello";
Fmt.println(Sys.type(s)); // "string"
let list = [1, 2, 3];
Fmt.println(Sys.type(list)); // "list"
Use + to join strings and other values:
ayanmo name = "Ifá";
ayanmo age = 1000;
Irosu.fo("Name: " + name);
Irosu.fo("Age: " + age); // Numbers auto-convert
let name = "Ifá";
let age = 1000;
Fmt.println("Name: " + name);
Fmt.println("Age: " + age); // Numbers auto-convert
Variables can be reassigned (shadowed) or modified:
ayanmo count = 0;
Irosu.fo(count); // 0
ayanmo count = count + 1; // Shadowing (original pattern)
Irosu.fo(count); // 1
// Or strictly speaking, mutable updates depend on scope,
// usually we use standard 'ayanmo' again for shadowing in examples.
let count = 0;
Fmt.println(count); // 0
let count = count + 1; // Shadowing
Fmt.println(count); // 1
ayanmo or let+Ogbe.type() / Sys.type()