Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@lukaszcz
Copy link
Collaborator

@lukaszcz lukaszcz commented Aug 13, 2025

The let! pat := v; b syntax desugars to match v with | pat => b | _ => default. The value returned on failure (instead of default, when v does not match pat) can be specified with the failwith clause: let! pat := v failwith failure; b. The monadic version let! x ← mv; b can be used when mv : m V for some monad m. The type of pat can be specified.

@lukaszcz lukaszcz self-assigned this Aug 13, 2025
@lukaszcz lukaszcz requested a review from janmasrovira August 13, 2025 09:09
@lukaszcz lukaszcz mentioned this pull request Aug 13, 2025
@lukaszcz lukaszcz merged commit 13a70ba into main Aug 25, 2025
2 checks passed
@lukaszcz lukaszcz deleted the let-bang branch August 25, 2025 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants