Identifier pattern

The identifier pattern is even simpler than the value-binding pattern. The identifier pattern is the constant or variable name itself; in the example above, that’s the x in the pattern. You’re telling the compiler, “When you find a value of (something, 0, 0), assign the something to x.”

This description feels intertwined with what you’ve seen before because the identifier pattern is a sub-pattern of the value-binding pattern.

Yeah, it’s a little like Inception — but far more practical. :]

results matching ""

    No results matching ""