diff options
| author | tslil <tslil@posteo.de> | 2026-03-21 20:21:32 +0000 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-03-21 20:37:21 +0000 |
| commit | 139047379b2ff7751c1b5ef8e079ffc29cce752d (patch) | |
| tree | 268f05bb48cc0110a65202740ff763c3c133b9b0 /rprt.md | |
| parent | 89d299376c97a3f866dccc15321713ce955d8125 (diff) | |
implement hooks, fix docs
Diffstat (limited to 'rprt.md')
| -rw-r--r-- | rprt.md | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -99,8 +99,8 @@ RPRT provides two explicit hook combinators from BQN for flexible function compo **After (Right Hook)** `F<G`: - Niladic: `F<G = ???` TODO: undefined? -- Monadic: `ω (F<G) = ω F (G ω)` -- Dyadic: `ω (F<G) α = ω F (G α)` +- Monadic: `ω (F<G) = ω F (ω G)` +- Dyadic: `ω (F<G) α = ω F (α G)` These combinators bind more tightly than trains and enable partial application patterns. Hooks are **right-associative**, the _opposite_ of BQN's modifier associativity: `F<G<H` parses as `F<(G<H)`. @@ -218,10 +218,8 @@ Because top-level expressions are evaluated niladically (§1.5), searching requi **Search from buffer start:** `/re/` Niladic application searches from beginning of buffer -**Search within current selection:** `.>/re/` -In the niladic form this is `(.) /re/` (left hook semantics, §1.2), and `.` niladically is the current selection (§3.1). Thus `.>/re/` applies `/re/` to the current selection. - -The After hook `F<G` has niladic semantics `F (G)`, making `.< /re/` evaluate to `/re/ (.)`—applying the search function to the current selection. +**Search within current selection:** `.>/re/` or `./re/` +In the niladic form this is `(.) /re/` (left hook semantics §1.2, or left associativity), and `.` niladically is the current selection (§3.1). Thus both `.>/re/` and `./re/` apply `/re/` to the current selection. ## 2.2 Selection Function Operators |
