The Foundation — System/Lifecycle
Type introspection, assertions, parsing
Get the type name of a value.
ayanmo x = 42;
Irosu.fo(Ogbe.type(x)); // "int"
ayanmo s = "hello";
Irosu.fo(Ogbe.type(s)); // "string"
ayanmo list = [1, 2, 3];
Irosu.fo(Ogbe.type(list)); // "list"
Get the length of a value (string chars, list items, etc.).
Irosu.fo(Ogbe.len("Ifá")); // 3
Irosu.fo(Ogbe.len([1,2,3,4])); // 4
Assert a condition is true, throw error if false.
Ogbe.assert(x > 0, "x must be positive");
Ogbe.j?ri(list.len() > 0, "List cannot be empty");
Format values into a string.
ayanmo msg = Ogbe.format("User:", name, "Age:", age);
Irosu.fo(msg);
Parse a string to integer.
ayanmo n = Ogbe.parse_int("42");
Irosu.fo(n + 8); // 50
Parse a string to float.
ayanmo f = Ogbe.parse_float("3.14");
Irosu.fo(f * 2); // 6.28