Operators
The entire language. Every operator describes a relationship between signals. No assignment. No arithmetic. Connections.
Flow
How signals move through the graph. Every program is built from these.
| Operator | Name | Meaning |
|---|---|---|
| -> | flow | Signal flows from left to right |
| ~> | tap | Observe without affecting (read-only) |
| -x> | sever | Cut a wire (disconnect, unfollow, block) |
| <-> | exchange | Bidirectional — request/response, ack |
| @ | pin | Run on specific hardware |
.zpflow operators
// signal flows left to right
sensor -> gate(> 20cm) -> motor
// tap observes without affecting
controller -> motor
controller ~> dashboard
// sever cuts a connection
user -x> feed
// exchange is bidirectional
request <-> handler -> response
// pin to hardware
detect @ goya(0) -> objectsStructure
How signals combine and split. Merge converges. Fork diverges. Chain sequences.
| Operator | Name | Meaning |
|---|---|---|
| | | merge | Multiple signals converge into one point |
| {} | fork | One signal splits to multiple paths simultaneously |
| -> chain | chain | A -> B -> C — signal flows through a pipeline |
.zpstructure
// merge — three signals converge
sonar -> |
camera -> | -> decision
lidar -> |
// fork — one signal, multiple paths
camera -> {
display,
detect -> classify -> act
}
// chain — pipeline
raw -> filter -> normalize -> storeLogic
Signal evaluation. Gates pass or block. Delta measures change. These are keywords, not functions.
| Operator | Name | Meaning |
|---|---|---|
| gate() | gate | Signal passes or doesn't |
| knee: | knee | Smooth transition zone (no hard cutoff) |
| delta() | delta | Rate of change: t - t-1 |
.zplogic
// gate — threshold
signal -> gate(> 80C) -> alarm
// gate with knee — smooth transition
temp -> gate(< 72F, knee: 3F) -> heater
// delta — rate of change
delta(temp) -> gate(> 2C) -> rising_fastTemporal
Time is a first-class dimension. Every signal has history. The OS maintains it.
| Operator | Name | Meaning |
|---|---|---|
| t | now | Current signal value |
| t-1 | previous | One step back |
| t-N | history | N steps back |
| on_silence() | silence | Nothing arrived for duration |
| on_block | blocked | Gate rejected the signal |
| sustained: | sustained | Gate must hold for duration |
| within() | confluence | Signals must arrive within time window |
| then | sequence | A then B — ordered temporal coincidence |
| debounce() | debounce | Collapse rapid signals into one |
| throttle() | throttle | Limit signal rate |
| decay() | decay | Signal strength decreases over time |
| tick() | clock | Emit signal at fixed rate |
.zptemporal
// sustained — must hold for duration
errors -> rate(per: 1m) -> gate(> 10, sustained: 5m) -> alarm
// silence detection
sensor -> on_silence(> 100ms) -> failover
// confluence — within a time window
a -> |
b -> | within(100ms) | -> fused
// clock
heartbeat : tick(rate: 60Hz) -> frameValue
Pattern matching on signal values. Range, any-of, negation, sigma.
| Operator | Name | Meaning |
|---|---|---|
| ~ | range | Between two values: 0.6 ~ 0.9 |
| any() | or-match | Match any of several values |
| not: | negate | Exclude matches |
| σ | sigma | Standard deviations from baseline |
.zpvalue
// range
signal -> gate(0.6 ~ 0.9) -> tier_general
// any-of
signal -> gate(command: any("set", "del")) -> writes
// negation
signal -> gate(not: "*.tmp", ".git/*") -> clean
// sigma
dev -> gate(> 2σ, knee: 1σ) -> anomaly