Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions lib/aiken/collection/dict.ak
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,7 @@ fn do_has_key(self: Pairs<ByteArray, value>, key k: ByteArray) -> Bool {
/// dict.is_empty(dict.empty) == True
/// ```
pub fn is_empty(self: Dict<key, value>) -> Bool {
when self.inner is {
[] -> True
_ -> False
}
builtin.null_list(self.inner)
}

/// Extract all the keys present in a given `Dict`.
Expand Down
5 changes: 1 addition & 4 deletions lib/aiken/collection/list.ak
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,7 @@ pub fn head(self: List<a>) -> Option<a> {
/// list.is_empty([1, 2, 3]) == False
/// ```
pub fn is_empty(self: List<a>) -> Bool {
when self is {
[] -> True
_ -> False
}
builtin.null_list(self)
}

/// Gets the index of an element of a list, if any. Otherwise, returns None.
Expand Down
Loading