Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mdr committed Dec 1, 2024
1 parent 7543798 commit bc974a6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Aoc2024/Utils.lean
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ instance [BEq α] [BEq β] : BEq (Except α β) where
| Except.error x, Except.error y => x == y
| _, _ => false

def getOrThrow (message : String) (o : Option α) : Except String α :=
match o with
def getOrThrow (message : String) : Option α -> Except String α
| some x => pure x
| none => throw message

Expand Down

0 comments on commit bc974a6

Please sign in to comment.