mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 00:13:12 +03:00
hoon: updates +slew to avoid dynamic eval
This commit is contained in:
parent
d89c73fc79
commit
e4e0c31975
@ -11410,13 +11410,12 @@
|
||||
==
|
||||
::
|
||||
++ slew :: get axis in vase
|
||||
|= [axe=@ vax=vase] ^- (unit vase)
|
||||
?. |- ^- ?
|
||||
?: =(1 axe) &
|
||||
?. ?=(^ q.vax) |
|
||||
$(axe (mas axe), q.vax .*(q.vax [0 (cap axe)]))
|
||||
~
|
||||
`[(~(peek ut p.vax) %free axe) .*(q.vax [0 axe])]
|
||||
|= [axe=@ vax=vase]
|
||||
=/ typ |. (~(peek ut p.vax) %free axe)
|
||||
|- ^- (unit vase)
|
||||
?: =(1 axe) `[$:typ q.vax]
|
||||
?@ q.vax ~
|
||||
$(axe (mas axe), q.vax ?-((cap axe) %2 -.q.vax, %3 +.q.vax))
|
||||
::
|
||||
++ slim :: identical to seer?
|
||||
|= old=vise ^- vase
|
||||
|
Loading…
Reference in New Issue
Block a user