Update if-let.md

This commit is contained in:
bluecereal 2017-02-05 20:20:43 -05:00 committed by GitHub
parent ebf07da0a5
commit fb7f211c0c

View File

@ -1,7 +1,7 @@
% if let
`if let` allows us to match [patterns][patterns] within the condition of an [if][if].
As a consequence, we reduce the overhead of certain kinds of [pattern][patterns] matches
`if let` permits [patterns][pattern] matching within the condition of an [if][if] statement.
This allows us to reduce the overhead of certain kinds of [pattern][patterns] matches
and express them in a more convenient way.
For example, lets say we have some sort of `Option<T>`. We want to call a function