Example-driven memory session implementation.

References #6.