Merge pull request #6819 from urbit/revert-6592-ea/add-subaxis-test

Revert "hoon: add pin and awl arms to test and trim subaxes"
This commit is contained in:
Pyry Kovanen 2023-10-06 19:37:06 +03:00 committed by GitHub
commit 0b10a3003e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -226,34 +226,6 @@
* (add (mod b 2) (mul $(b (div b 2)) 2))
==
::
++ pin
~/ %pin
:: sub axis test
::
:: checks whether {b} addresses a subtree of the tree addressed by {a}.
|= [a=@ b=@]
?< =(0 a)
?< =(0 b)
|- ^- ?
?: =(a 1) &
?: =(b 1) |
?. =((cap a) (cap b)) |
$(a (mas a), b (mas b))
::
++ hub
~/ %hub
:: axis after axis
::
:: computes the remainder of axis {b} when navigating to {a}.
:: (crashes if not `(pin a b)`)
|= [a=@ b=@]
?< =(0 a)
?< =(0 b)
|- ^- @
?: =(a 1) b
?> =((cap a) (cap b))
$(a (mas a), b (mas b))
::
:: # %containers
::
:: the most basic of data types