2 ms·
Any unrefutable pattern, I believe. EDIT: whoops! I got it backwards. It's refutable, right, duh. :)
by steveklabnik 10y ago
Any unrefutable pattern, I believe.
EDIT: whoops! I got it backwards. It's refutable, right, duh. :)
- gue5t 10y agoIf-let can be used with refutable patterns (the refutation/counterexample to the pattern is when the else case runs). Irrefutable patterns can be used with regular let.
- tomjakubowski 10y agoAny refutable pattern; for irrefutable patterns the "if let"'s pattern would always match, so it would be kinda redundant. :-)