From c6d5a2656ddf7e15e1280b961c85511fc4a5bb04 Mon Sep 17 00:00:00 2001 From: Alex Shelkovnykov Date: Mon, 4 Sep 2023 15:44:11 -0600 Subject: [PATCH] hoon: add +turn --- hoon/scaffolding/playpen.hoon | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hoon/scaffolding/playpen.hoon b/hoon/scaffolding/playpen.hoon index 785ae6b..879bbf1 100644 --- a/hoon/scaffolding/playpen.hoon +++ b/hoon/scaffolding/playpen.hoon @@ -247,6 +247,15 @@ ?: =(0 a) i.b $(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 |* [a=(list) b=(list)]