You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the common case of matching a pattern and returning from the function, use let else. The "else" case must diverge (return, break, or panic - anything but falling off the end of the block).
However, the code just after is about if let ... else, for which the else block doesn't need to diverge.
The code example for let ... else is hidden in the speaker notes, but that slide is quite long so a speaker may miss it.
The text was updated successfully, but these errors were encountered:
Rewrite the awkward version for students, so they can see the transformation
but that's easy to miss, especially if doing the course without an instructor. How could we show the "triangle" of nested if-let's that the let-else syntax solves? What are your ideas?
The slide about
let ... else
expressions mentions that:However, the code just after is about
if let ... else
, for which the else block doesn't need to diverge.The code example for
let ... else
is hidden in the speaker notes, but that slide is quite long so a speaker may miss it.The text was updated successfully, but these errors were encountered: