mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 11:33:41 +03:00
story: generators: add check for invalid case
This commit is contained in:
parent
c02f59818e
commit
a149dc6c40
@ -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 {<cas>} provided"
|
||||
helm-pass+[%d %noop ~]
|
||||
=/ tak
|
||||
?: ?=([%tako tako:clay] cas)
|
||||
p.cas
|
||||
|
@ -13,7 +13,9 @@
|
||||
?: !(~(has in .^((set ^desk) %cd /(scot %p our)/$/(scot %da now))) desk)
|
||||
~& >> "Error: desk {<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 {<cas>} provided"
|
||||
helm-pass+[%d %noop ~]
|
||||
=/ tak
|
||||
?: ?=([%tako tako:clay] cas)
|
||||
p.cas
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user