tricu

An interpreted language for exploring Tree Calculus
Log | Files | Refs | README | LICENSE

pathName.scp (506B)


      1 !export pathName
      2 -- Select a target with one worker, then tail-delegate to another.
      3 -- Input: target; state: (prefixer, handler) worker descriptors. `call`
      4 -- prefixer uses its initial state; `become` invokes handler on the selected
      5 -- result with explicit leaf state, not the handler's stored initial state.
      6 -- For example, stripPrefix may select a maybe-shaped path suffix for unwrap.
      7 consumer pathName
      8   target @ (prefixer, handler) => call prefixer target as selected in become handler selected @ leaf