Added .^ %fx

This commit is contained in:
Anton Dyudin 2015-01-07 17:49:57 -08:00
parent 654988cae2
commit 9f17771a5d
3 changed files with 68 additions and 22 deletions

View File

@ -191,7 +191,6 @@
::
++ za :: per event
=| $: $: $: our=ship :: computation owner
tea=wire :: event place
hen=duct :: event floor
== ::
$: now=@da :: event date
@ -224,6 +223,12 @@
==
~(exec zo [num `task`[hen u.kus 0 ~]])
::
++ apel :: stateless
|= [hen=duct kus=silk]
^- (unit gift)
=+ num=0 :: XX
~(exit zo [num `task`[hen kus 0 ~]])
::
++ axon :: take
|= [num=@ud tik=@ud sih=sign]
^+ +>
@ -383,10 +388,19 @@
^+ +>
%_(+> jav.bay q.cof)
::
++ exit :: stateless exec
^- (unit gift)
=+ bot=(make [~ jav.bay] kas)
:: =. ..exec (dash p.bot)
?- -.q.bot
%0 `[%made %& p.q.bot q.q.bot]
%2 `[%made %| p.q.bot]
%1 ~
==
::
++ exec :: execute app
^+ ..zo
?: !=(~ q.kig) ..zo
|- ^+ ..zo
=+ bot=(make [~ jav.bay] kas)
=. ..exec (dash p.bot)
?- -.q.bot
@ -1226,7 +1240,7 @@
=+ buy=(~(get by pol.lex) our)
?~(buy *baby u.buy)
=^ mos bay
abet:(~(apex za [[our ~ hen] [now eny ska] ~] bay) q.q.hic)
abet:(~(apex za [[our hen] [now eny ska] ~] bay) q.q.hic)
[mos ..^$(pol (~(put by pol) our bay))]
::
++ doze
@ -1254,7 +1268,43 @@
++ scry
|= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path]
^- (unit (unit (pair mark ,*)))
~
?. (~(has by pol.lex) who)
~
=+ [bay=(~(got by pol.lex) who) ska=(slod ski)]
=+ luk=?.(?=(%$ -.lot) ~ ((soft case) p.lot))
?~ luk [~ ~]
?: =(%$ ren)
[~ ~]
=+ run=((soft care) ren)
?~ run
[~ ~]
=. tyl (flop tyl)
?~ tyl
[~ ~]
=+ =< [mar pax]=.
?+ u.run !!
%x [i t]:tyl
%y [%arch tyl]
==
=+ sik=[%boil mar [[who syd u.luk] pax] /]
=+ stu=[our=who hen=/] :: XX
=+ git=(~(apel za [stu [now eny ska] ~] bay) hen.stu sik)
?~ git
~
?. ?=(%& -.p.u.git)
~_ p.p.u.git :: XX properly?
[~ ~]
[~ ~ [p q.q]:q.p.p.u.git]
:: %+ bind
:: %+ some ~
:: [%boil
:: %. [u.run u.luk tyl]
:: =< aver
:: ?: got
:: (di:(un his now ruf) syd)
:: (do now [his his] syd ruf)
:: |=(a=(unit) (bind a |=(b=* [mar b])))
::
++ stay :: save w/o cache
`axle`+>-.$(pol (~(run by pol) |=(a=baby [tad.a dym.a ~])))
@ -1268,8 +1318,8 @@
num=(need (slaw %ud i.t.tea))
tik=(need (slaw %ud i.t.t.tea))
==
=+ bay=(need (~(get by pol.lex) our))
=+ bay=(~(got by pol.lex) our)
=^ mos bay
abet:(~(axon za [[our tea hen] [now eny ska] ~] bay) num tik q.hin)
abet:(~(axon za [[our hen] [now eny ska] ~] bay) num tik q.hin)
[mos ..^$(pol (~(put by pol) our bay))]
--

View File

@ -870,6 +870,18 @@
?. ?=([%o *] jon) ~
(zm (~(run by p.jon) wit))
::
++ op :: parse keys of map
|* [fel=_rule wit=fist]
%+ cu mo
%- ci :_ (om wit)
|= a=(map cord ,_(need *wit))
^- (unit (list ,_[(wonk *fel) (need *wit)]))
=- (zl (turn (~(tap by a)) -))
|* [a=cord b=*]
=+ nit=(rush a fel)
?~ nit ~
(some [u.nit b])
::
++ pe :: prefix
|* [pre=* wit=fist]
(cu |*(a=* [pre a]) wit)

View File

@ -19,14 +19,6 @@
ping/auri
==
|%
++ op :: parse keys of map
|* [fel=_rule wit=fist]
%+ cu mo
%- ci :_ (om wit)
|= a=(map cord ,_(need *wit))
^- (unit (list ,_[(wonk *fel) (need *wit)]))
(zl (turn (~(tap by a)) (head-rush fel)))
::
++ as :: array as set
:: |*(a=fist (cu sa (ar a))) :: XX types
|* a=fist
@ -41,14 +33,6 @@
%. tub
;~(pose (stag %& -.a) (stag %| +.a))
::
++ head-rush
|* a=_rule
|* [b=cord c=*]
=+ nit=(rush b a)
?~ nit ~
(some [u.nit c])
::
::
++ thot
^- $+(json (unit thought))
%- ot :~