Merge branch 'worktree-macros-essays' into macros
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 4m2s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 4m2s
This commit is contained in:
@@ -196,6 +196,8 @@ def prim_is_empty(coll: Any) -> bool:
|
||||
|
||||
@register_primitive("contains?")
|
||||
def prim_contains(coll: Any, key: Any) -> bool:
|
||||
if isinstance(coll, str):
|
||||
return str(key) in coll
|
||||
if isinstance(coll, dict):
|
||||
k = key.name if isinstance(key, Keyword) else key
|
||||
return k in coll
|
||||
|
||||
Reference in New Issue
Block a user