mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-28 11:40:11 +03:00
various: fix packaging
This commit is contained in:
parent
553e848554
commit
e4fad4f7b1
55
pkg/garden-dev/lib/mip.hoon
Normal file
55
pkg/garden-dev/lib/mip.hoon
Normal file
@ -0,0 +1,55 @@
|
||||
|%
|
||||
++ mip :: map of maps
|
||||
|$ [kex key value]
|
||||
(map kex (map key value))
|
||||
::
|
||||
++ bi :: mip engine
|
||||
=| a=(map * (map))
|
||||
|@
|
||||
++ del
|
||||
|* [b=* c=*]
|
||||
=+ d=(~(gut by a) b ~)
|
||||
=+ e=(~(del by d) c)
|
||||
?~ e
|
||||
(~(del by a) b)
|
||||
(~(put by a) b e)
|
||||
::
|
||||
++ get
|
||||
|* [b=* c=*]
|
||||
=> .(b `_?>(?=(^ a) p.n.a)`b, c `_?>(?=(^ a) ?>(?=(^ q.n.a) p.n.q.n.a))`c)
|
||||
^- (unit _?>(?=(^ a) ?>(?=(^ q.n.a) q.n.q.n.a)))
|
||||
(~(get by (~(gut by a) b ~)) c)
|
||||
::
|
||||
++ got
|
||||
|* [b=* c=*]
|
||||
(need (get b c))
|
||||
::
|
||||
++ gut
|
||||
|* [b=* c=* d=*]
|
||||
(~(gut by (~(gut by a) b ~)) c d)
|
||||
::
|
||||
++ has
|
||||
|* [b=* c=*]
|
||||
!=(~ (get b c))
|
||||
::
|
||||
++ key
|
||||
|* b=*
|
||||
~(key by (~(gut by a) b ~))
|
||||
::
|
||||
++ put
|
||||
|* [b=* c=* d=*]
|
||||
%+ ~(put by a) b
|
||||
%. [c d]
|
||||
%~ put by
|
||||
(~(gut by a) b ~)
|
||||
::
|
||||
++ tap
|
||||
::NOTE naive turn-based implementation find-errors ):
|
||||
=< $
|
||||
=+ b=`_?>(?=(^ a) *(list [x=_p.n.a _?>(?=(^ q.n.a) [y=p v=q]:n.q.n.a)]))`~
|
||||
|. ^+ b
|
||||
?~ a
|
||||
b
|
||||
$(a r.a, b (welp (turn ~(tap by q.n.a) (lead p.n.a)) $(a l.a)))
|
||||
--
|
||||
--
|
@ -1,55 +0,0 @@
|
||||
|%
|
||||
++ mip :: map of maps
|
||||
|$ [kex key value]
|
||||
(map kex (map key value))
|
||||
::
|
||||
++ bi :: mip engine
|
||||
=| a=(map * (map))
|
||||
|@
|
||||
++ del
|
||||
|* [b=* c=*]
|
||||
=+ d=(~(gut by a) b ~)
|
||||
=+ e=(~(del by d) c)
|
||||
?~ e
|
||||
(~(del by a) b)
|
||||
(~(put by a) b e)
|
||||
::
|
||||
++ get
|
||||
|* [b=* c=*]
|
||||
=> .(b `_?>(?=(^ a) p.n.a)`b, c `_?>(?=(^ a) ?>(?=(^ q.n.a) p.n.q.n.a))`c)
|
||||
^- (unit _?>(?=(^ a) ?>(?=(^ q.n.a) q.n.q.n.a)))
|
||||
(~(get by (~(gut by a) b ~)) c)
|
||||
::
|
||||
++ got
|
||||
|* [b=* c=*]
|
||||
(need (get b c))
|
||||
::
|
||||
++ gut
|
||||
|* [b=* c=* d=*]
|
||||
(~(gut by (~(gut by a) b ~)) c d)
|
||||
::
|
||||
++ has
|
||||
|* [b=* c=*]
|
||||
!=(~ (get b c))
|
||||
::
|
||||
++ key
|
||||
|* b=*
|
||||
~(key by (~(gut by a) b ~))
|
||||
::
|
||||
++ put
|
||||
|* [b=* c=* d=*]
|
||||
%+ ~(put by a) b
|
||||
%. [c d]
|
||||
%~ put by
|
||||
(~(gut by a) b ~)
|
||||
::
|
||||
++ tap
|
||||
::NOTE naive turn-based implementation find-errors ):
|
||||
=< $
|
||||
=+ b=`_?>(?=(^ a) *(list [x=_p.n.a _?>(?=(^ q.n.a) [y=p v=q]:n.q.n.a)]))`~
|
||||
|. ^+ b
|
||||
?~ a
|
||||
b
|
||||
$(a r.a, b (welp (turn ~(tap by q.n.a) (lead p.n.a)) $(a l.a)))
|
||||
--
|
||||
--
|
1
pkg/garden/lib/mip.hoon
Symbolic link
1
pkg/garden/lib/mip.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../garden-dev/lib/mip.hoon
|
1
pkg/landscape/lib/mip.hoon
Symbolic link
1
pkg/landscape/lib/mip.hoon
Symbolic link
@ -0,0 +1 @@
|
||||
../../garden-dev/lib/mip.hoon
|
Loading…
Reference in New Issue
Block a user