mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-05 22:38:44 +00:00
Added isEmptySet/isEmptyMap
This commit is contained in:
parent
8359b674f8
commit
849162aa92
4 changed files with 13 additions and 1 deletions
|
|
@ -214,6 +214,10 @@ public fun emptyMap (compare) {
|
|||
[{}, compare]
|
||||
}
|
||||
|
||||
public fun isEmptyMap ([l, _]) {
|
||||
case l of {} -> true | _ -> false esac
|
||||
}
|
||||
|
||||
public fun addMap (m, k, v) {
|
||||
insertColl (m, k, v, Map)
|
||||
}
|
||||
|
|
@ -251,6 +255,10 @@ public fun emptySet (compare) {
|
|||
[{}, compare]
|
||||
}
|
||||
|
||||
public fun isEmptySet (s) {
|
||||
isEmptyMap (s)
|
||||
}
|
||||
|
||||
public fun addSet (s, v) {
|
||||
insertColl (s, v, true, Set)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue