hoon: add +turn

This commit is contained in:
Alex Shelkovnykov 2023-09-04 15:44:11 -06:00
parent 2833fe1878
commit c6d5a2656d

View File

@ -247,6 +247,15 @@
?: =(0 a) i.b ?: =(0 a) i.b
$(b t.b, a (dec a)) $(b t.b, a (dec a))
:: ::
++ turn :: transform
~/ %turn
|* [a=(list) b=gate]
=> .(a (homo a))
^- (list _?>(?=(^ a) (b i.a)))
|-
?~ a ~
[i=(b i.a) t=$(a t.a)]
::
++ weld :: concatenate ++ weld :: concatenate
~/ %weld ~/ %weld
|* [a=(list) b=(list)] |* [a=(list) b=(list)]