Skip to content

Commit

Permalink
chore: Add empty collection instance to BinomialHeap (#532)
Browse files Browse the repository at this point in the history
  • Loading branch information
joehendrix authored Jan 16, 2024
1 parent 01d1cae commit b1ebd72
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Std/Data/BinomialHeap/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ variable {α : Type u} {le : α → α → Bool}
/-- `O(1)`. Make a new empty binomial heap. -/
@[inline] def empty : BinomialHeap α le := mkBinomialHeap α le

instance : EmptyCollection (BinomialHeap α le) := ⟨.empty⟩
instance : Inhabited (BinomialHeap α le) := ⟨.empty⟩

/-- `O(1)`. Is the heap empty? -/
Expand Down

0 comments on commit b1ebd72

Please sign in to comment.