mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-25 04:33:45 +03:00
[ new ] popping value from a SortedSet
This commit is contained in:
parent
692e389bb8
commit
263643defd
@ -86,3 +86,9 @@ toSortedMap (SetWrapper m) = m
|
||||
export
|
||||
min : SortedSet k -> Maybe k
|
||||
min (SetWrapper m) = fst <$> min m
|
||||
|
||||
export
|
||||
pop : SortedSet k -> Maybe (k, SortedSet k)
|
||||
pop (SetWrapper m) = do
|
||||
((k, ()), m) <- pop m
|
||||
pure (k, SetWrapper m)
|
||||
|
Loading…
Reference in New Issue
Block a user