mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-24 10:33:22 +03:00
b3901ab42f
git-subtree-dir: pkg/arvo git-subtree-mainline:9c8f40bf6c
git-subtree-split:c20e2a185f
34 lines
1.8 KiB
Plaintext
34 lines
1.8 KiB
Plaintext
/- sole
|
|
=, sole
|
|
|%
|
|
++ produce :: construct result
|
|
|* pro/* ::
|
|
[p=*(list tank) q=[%& p=[~ u=pro]]] ::
|
|
:: ::
|
|
++ print :: add output tank
|
|
|* {tan/tank res/(sole-result)} ::
|
|
?@ res res ::
|
|
[p=[i=tan t=p.res] q=q.res] ::
|
|
:: ::
|
|
++ prompt :: construct prompt
|
|
|* {pom/sole-prompt mor/(sole-dialog)} ::
|
|
[p=*(list tank) q=[%| p=pom q=mor]] ::
|
|
:: ::
|
|
++ curl :: fetch url
|
|
=| usr/knot ::
|
|
|* {pul/_purl:eyre fun/$-(httr:eyre *)} ::
|
|
:- p=*(list tank) ::
|
|
q=[%| p=`usr q=[pul %get ~ ~] r=fun] ::
|
|
:: ::
|
|
++ no-product :: empty result
|
|
[p=*(list tank) q=[%& ~]] ::
|
|
:: ::
|
|
++ parse :: parse by rule
|
|
|* {sef/rule fun/$-(* *)} ::
|
|
|= txt/sole-input ::
|
|
=+ vex=(sef [0 0] txt) ::
|
|
?: |(!=((lent txt) q.p.vex) ?=($~ q.vex)) ::
|
|
q.p.vex ::
|
|
(fun p.u.q.vex) ::
|
|
--
|