diff --git a/subject-knowledge/lib/subject-knowledge.hoon b/subject-knowledge/lib/subject-knowledge.hoon index c3e58de..b2b1f06 100644 --- a/subject-knowledge/lib/subject-knowledge.hoon +++ b/subject-knowledge/lib/subject-knowledge.hoon @@ -407,7 +407,7 @@ :: memo hit ~& "Hit: sock {<[s]>} formula {} result {}" [[%hit u.u.mem] memo] - ?+ f ~| %pull-bonk !! + ?+ f ~| "Unrecognized nock {}" ~| %pull-bonk !! :: [[* *] *] =^ pfoot memo $(f -.f) @@ -523,6 +523,55 @@ =^ pathfoot memo $(f path.f) [[[%12 reffoot pathfoot] s [%gues ~]] memo] == +:: example nocks for testing +++ nocs + |% + ++ dec + != + !. + => + => %ed + |% + ++ dec + |= x=@ + ~> %data.[x ~] + ^- @ + =| d=@ + |- + ^- d=@ + ?: =(.+(d) x) + d + $(d .+(d)) + -- + (dec 8) + ++ ad + != + !. + => + => %ed + |% + ++ dec + |= x=@ + ~> %data.[x ~] + ^- @ + =| d=@ + |- + ^- d=@ + ?: =(.+(d) x) + d + $(d .+(d)) + ++ add + |= [x=@ y=@] + ~> %data.[x y ~] + ^- @ + |- + ^- @ + ?: =(x 0) + y + $(x (dec x), y .+(y)) + -- + (add 5 8) + -- -- |% +$ sock