mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 20:04:09 +03:00
init .plan mark
This commit is contained in:
parent
a1df9b2a59
commit
ccc01741a3
11
mar/plan-diff.hoon
Normal file
11
mar/plan-diff.hoon
Normal file
@ -0,0 +1,11 @@
|
||||
::
|
||||
:::: /hoon/plan-diff/mar
|
||||
::
|
||||
/? 310
|
||||
/- plan-diff
|
||||
!:
|
||||
:::: ~fyr
|
||||
::
|
||||
|_ plan-diff
|
||||
++ grab |% ++ noun plan-diff
|
||||
-- --
|
48
mar/plan.hoon
Normal file
48
mar/plan.hoon
Normal file
@ -0,0 +1,48 @@
|
||||
::
|
||||
:::: /hoon/plan/mar
|
||||
::
|
||||
/? 310
|
||||
/- plan-diff
|
||||
!:
|
||||
:::: ~fyr
|
||||
::
|
||||
|_ all/(map knot iden)
|
||||
::
|
||||
++ grow :: convert to
|
||||
|%
|
||||
++ txt
|
||||
%+ turn (sort (~(tap by all)) aor)
|
||||
|=({a/knot b/iden} (crip "{(trip a)}: {(trip b)}"))
|
||||
--
|
||||
++ grab |% :: convert from
|
||||
++ noun (map knot iden) :: clam from %noun
|
||||
++ txt
|
||||
|= a/wain
|
||||
%- ~(gas by all)
|
||||
(turn a |=(b/cord (rash b ;~((glue (jest ': ')) urs:ab urs:ab))))
|
||||
:: ++ elem ,~
|
||||
--
|
||||
++ grad
|
||||
|%
|
||||
++ form %plan-diff
|
||||
++ diff
|
||||
=| out/plan-diff
|
||||
|= neu/(map knot iden) ^+ out :: XXX map functions
|
||||
:- =< (malt `(list {knot $~})`(murn (~(tap by all)) .))
|
||||
|= {a/knot @} ^- (unit {knot $~})
|
||||
?:((~(has by neu) a) ~ (some [a ~]))
|
||||
=< (malt (murn (~(tap by neu)) .))
|
||||
|= {a/knot b/iden} ^- (unit {knot iden})
|
||||
?: =([~ b] (~(get by all) a))
|
||||
~
|
||||
(some [a b])
|
||||
::
|
||||
++ pact
|
||||
|= dif/plan-diff ^+ all :: XXX map functions
|
||||
=; neu (~(uni by neu) put.dif)
|
||||
=+ del=(~(tap by del.dif))
|
||||
|- ^+ all
|
||||
?~ del all
|
||||
$(del t.del, all (~(del by all) p.i.del))
|
||||
--
|
||||
--
|
1
sur/plan-diff.hoon
Normal file
1
sur/plan-diff.hoon
Normal file
@ -0,0 +1 @@
|
||||
{del/(map knot $~) put/(map knot iden)}
|
Loading…
Reference in New Issue
Block a user