Zulip Chat Archive
Stream: lean4
Topic: Unwrap Except
Cole Shepherd (Dec 03 2022 at 20:46):
How do you unwrap an Except
, and panic if it's an error?
Henrik Böving (Dec 03 2022 at 20:53):
You can pattern match on it I guess? Like so:
let .ok val := x | panic! "Ahhhh"
val
Henrik Böving (Dec 03 2022 at 20:53):
But there is no built in unwrap() style function right now
Last updated: Dec 20 2023 at 11:08 UTC