.me Operators
Kernel: this.me 4.2.1 (npm) ⓘ
Each example ran on 4.2.1 in a fresh new ME(); the result is what it returned.
An operator is called as a bracketed key on a path: me.path["op"](arg). Selectors ([i], filters, ranges, x[]) are path syntax, not operators: see .me Syntax. Collection aggregates x[] (count) and x[].f (sum) are path syntax too: see Aggregates.
| Operator | Name | Example | Result on 4.2.1 | Details |
|---|---|---|---|---|
@ |
Identity | me["@"]("Abella"); me.inspect({ last: 1 }).memories[0].operator |
"@" |
Axioms A1 |
_ |
Secret scope | me.wallet["_"]("vault-key"); me.wallet.balance(500); me("wallet"); me("wallet.balance") |
undefined, 500 |
Axioms A0, A2 · Identity-Bound Secrets |
~ |
Noise reset | me.wallet["_"]("alpha"); me.wallet.secretA("A"); me.wallet["~"]("beta-seed"); me.wallet.secretB("B"); me("wallet.secretA"); me("wallet.secretB") |
undefined, "B" |
Axioms A3 |
__ / -> |
Pointer | me.inventory.stock(900); me.dashboard.card["->"]("inventory"); me("dashboard.card"); me("dashboard.card.stock") |
{ "__ptr": "inventory" }, 900 |
Pointer Composition · Axioms A4 |
= |
Derivation | me.order.subtotal(100); me.order.tax(16); me.order["="]("total", "subtotal + tax"); me("order.total") |
116 |
me.explain(path) · What is O(k)? |
? |
Query | me.user.name("Ana"); me.user.age(22); me.report["?"](["user.name", "user.age"], (n, a) => n + ":" + a); me("report") |
"Ana:22" (recorded as a "?" memory event) |
Axioms A5 |
- |
Tombstone remove | me.temp.value("to-delete"); me.temp["-"]("value"); me("temp.value") |
undefined (recorded as a "-" memory event) |
Axioms A6 |
__ and -> are the same operator; both return the same results above.
See also
- .me Syntax: paths, selectors and the call forms these operators use.
- Primitives:
meand the two verbs. - Axioms: the guarantees the kernel keeps for each operator.
- Operators & Logic (TypeScript docs)