2018-10-03 02:36:08 +03:00
|
|
|
/- sole
|
|
|
|
=, sole
|
|
|
|
|%
|
|
|
|
++ produce :: construct result
|
2020-11-25 23:22:55 +03:00
|
|
|
|* pro=* ::
|
2018-10-03 02:36:08 +03:00
|
|
|
[p=*(list tank) q=[%& p=[~ u=pro]]] ::
|
|
|
|
:: ::
|
|
|
|
++ print :: add output tank
|
2020-11-26 17:09:31 +03:00
|
|
|
|* [tan=tank res=(sole-result)] ::
|
2018-10-03 02:36:08 +03:00
|
|
|
?@ res res ::
|
|
|
|
[p=[i=tan t=p.res] q=q.res] ::
|
|
|
|
:: ::
|
|
|
|
++ prompt :: construct prompt
|
2020-11-26 17:09:31 +03:00
|
|
|
|* [pom=sole-prompt mor=(sole-dialog)] ::
|
2018-10-03 02:36:08 +03:00
|
|
|
[p=*(list tank) q=[%| p=pom q=mor]] ::
|
|
|
|
:: ::
|
|
|
|
++ curl :: fetch url
|
2020-11-25 23:22:55 +03:00
|
|
|
=| usr=knot ::
|
2020-11-26 17:09:31 +03:00
|
|
|
|* [pul=_purl:eyre fun=$-(httr:eyre *)] ::
|
2018-10-03 02:36:08 +03:00
|
|
|
:- p=*(list tank) ::
|
|
|
|
q=[%| p=`usr q=[pul %get ~ ~] r=fun] ::
|
|
|
|
:: ::
|
|
|
|
++ no-product :: empty result
|
|
|
|
[p=*(list tank) q=[%& ~]] ::
|
|
|
|
:: ::
|
|
|
|
++ parse :: parse by rule
|
2020-11-26 17:09:31 +03:00
|
|
|
|* [sef=rule fun=$-(* *)] ::
|
2020-11-25 23:22:55 +03:00
|
|
|
|= txt=sole-input ::
|
2018-10-03 02:36:08 +03:00
|
|
|
=+ vex=(sef [0 0] txt) ::
|
2020-11-27 15:25:40 +03:00
|
|
|
?: |(!=((lent txt) q.p.vex) ?=(~ q.vex)) ::
|
2018-10-03 02:36:08 +03:00
|
|
|
q.p.vex ::
|
|
|
|
(fun p.u.q.vex) ::
|
|
|
|
--
|