diff --git a/pkg/arvo/gen/hood/story-remove.hoon b/pkg/arvo/gen/hood/story-remove.hoon index c76e0f6d8..ae97a42dd 100644 --- a/pkg/arvo/gen/hood/story-remove.hoon +++ b/pkg/arvo/gen/hood/story-remove.hoon @@ -15,7 +15,9 @@ :: leaning towards no, and potentially even making the case non-optional =/ our p.bec =? cas =(*case cas) r.bec :: use case from beak if cas not provided -:: TODO case existence check +?: !.^(? %cs /(scot %cs /(scot %p our)/[desk]/(scot cas)/case)) + ~& >> "Error: invalid case {} provided" + helm-pass+[%d %noop ~] =/ tak ?: ?=([%tako tako:clay] cas) p.cas diff --git a/pkg/arvo/gen/hood/story-set.hoon b/pkg/arvo/gen/hood/story-set.hoon index d21bfccd9..f3f426c71 100644 --- a/pkg/arvo/gen/hood/story-set.hoon +++ b/pkg/arvo/gen/hood/story-set.hoon @@ -13,7 +13,9 @@ ?: !(~(has in .^((set ^desk) %cd /(scot %p our)/$/(scot %da now))) desk) ~& >> "Error: desk {} does not exist." helm-pass+[%d %noop ~] -:: TODO case existence check +?: !.^(? %cs /(scot %cs /(scot %p our)/[desk]/(scot cas)/case)) + ~& >> "Error: invalid case {} provided" + helm-pass+[%d %noop ~] =/ tak ?: ?=([%tako tako:clay] cas) p.cas diff --git a/pkg/base-dev/lib/story.hoon b/pkg/base-dev/lib/story.hoon index 8c6b30a84..244667766 100644 --- a/pkg/base-dev/lib/story.hoon +++ b/pkg/base-dev/lib/story.hoon @@ -11,7 +11,6 @@ :: 0 \ b = 0 :: anything in 0 but not in b is by definition 0 :: ?: =(~ a) ~ - ~& a :: uno := (a-b) + (merged items in both a and b) + (b-a) :: ret := (a-b) + (merged items in both a and b) :: ret = (~(int by a) uno) :: preserve only the entries whose keys are in a