is empty
returns whether a list or dict is empty
(any subject) -> boolean
If subject
is a list, returns true
if subject
is the empty list, returns false
otherwise.
If subject
is a dict, returns true
if subject
is the empty dict, returns false
otherwise.
Returns nil
if subject
is nil
Throws an error if subject
is neither a list nor a dict.
Parameters
Name | Type | Description |
---|---|---|
subject |
dict or list | The dict or list to inspect |