From 09b249b8192b39df3d666261165967566c996720 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Sat, 25 May 2019 00:23:24 -0700 Subject: [PATCH 1/2] fix +* spec parameter bunts (default to identity) --- sys/hoon.hoon | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/sys/hoon.hoon b/sys/hoon.hoon index 04192fdb7..713ddc3bb 100644 --- a/sys/hoon.hoon +++ b/sys/hoon.hoon @@ -16731,21 +16731,18 @@ %+ cook |= [b=term c=(list term) e=spec] ^- [term hoon] - :* b - :+ %brtr - :- %bscl - =- ?>(?=(^ -) -) - %+ turn c - |= =term - ^- spec - :+ %bsts - term - [%bshp [%base %noun] [%base %noun]] - :- %ktcl - :+ %made - [b c] - e - == + :- b + :+ %brtr + :- %bscl + =- ?>(?=(^ -) -) + %+ turn c + |= =term + ^- spec + =/ tar [%base %noun] + :+ %bsts term + :+ %bssg [%brts tar $/6] + [%bshp tar tar] + [%ktcl [%made [b c] e]] ;~ pfix (jest '+*') ;~ plug ;~(pfix gap sym) From 36ed4192a7f63915193f9f6b85bdf346a99ae4ab Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Sat, 25 May 2019 11:07:35 -0700 Subject: [PATCH 2/2] reconciles the definition of +mold and the expansion of +* --- sys/hoon.hoon | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/hoon.hoon b/sys/hoon.hoon index 7b32d12f9..cb7072f44 100644 --- a/sys/hoon.hoon +++ b/sys/hoon.hoon @@ -321,7 +321,7 @@ :: input if it fits or a default value if it doesn't. :: :: examples: * @ud ,[p=time q=?(%a %b)] - _|~(* +<) + $~(* $-(* *)) :: +* pair [head tail] :: dual tuple @@ -16735,13 +16735,14 @@ :+ %brtr :- %bscl =- ?>(?=(^ -) -) + :: for each .term in .c, produce $=(term $~(* $-(* *))) + :: ie {term}=mold + :: %+ turn c |= =term ^- spec =/ tar [%base %noun] - :+ %bsts term - :+ %bssg [%brts tar $/6] - [%bshp tar tar] + [%bsts term [%bssg tar [%bshp tar tar]]] [%ktcl [%made [b c] e]] ;~ pfix (jest '+*') ;~ plug