Correct example in documentation:

The original example showed how to read a variable from the session,
but was accidentally changed to writing a variable to a session.

Noted by Russell Jenkins (veryrusty) on the commit:
61a47fdc3d93c79a81ee83d2684ddfd932f0662e